diff options
| author | cyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864> | 2008-12-17 20:16:55 +0000 |
|---|---|---|
| committer | cyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864> | 2008-12-17 20:16:55 +0000 |
| commit | 2d72446860abac08dc4f36b10fde7536f7897956 (patch) | |
| tree | 25dc114bb696bc8752d68e6e050da8d3dda5f282 /src/protocol | |
| parent | 1cd73b4dadb8e618a0ec56289408922be42aac8a (diff) | |
More CMake work, mostly to handle both *nix and Windows builds.
Also some tweaks to generation files (like version.sh) to take both input and output files as arguments, to handle CMake when it's used for an out-of-source build.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1836 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/protocol')
| -rw-r--r-- | src/protocol/CMakeLists.txt | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/protocol/CMakeLists.txt b/src/protocol/CMakeLists.txt index 403348704..bb94e116a 100644 --- a/src/protocol/CMakeLists.txt +++ b/src/protocol/CMakeLists.txt @@ -14,7 +14,7 @@ list(SORT PROTOCOL_SRCS) #add_custom_target(modules) #add_dependencies(protocol build) -set_source_files_properties(${PROTOCOL_SRCS} PROPERTIES LANGUAGE CXX COMPILE_FLAGS "${CXXFLAGS}") +set_source_files_properties(${PROTOCOL_SRCS} PROPERTIES LANGUAGE CXX COMPILE_FLAGS "${MODULE_CXXFLAGS}") foreach(SRC ${PROTOCOL_SRCS}) string(REGEX REPLACE "\\.cpp$" ".x" SRC_X ${SRC}) @@ -39,11 +39,12 @@ foreach(SRC ${PROTOCOL_SRCS}) if(${SRC}_HEADERS) foreach(HEADER ${${SRC}_HEADERS}) string(SUBSTRING ${HEADER} 0 1 FIRST_CHAR) - if(FIRST_CHAR STREQUAL "/") + string(SUBSTRING ${HEADER} 1 1 SECOND_CHAR) + if(FIRST_CHAR STREQUAL "/" OR SECOND_CHAR STREQUAL ":") set(HEADERS ${HEADERS} ${HEADER}) - else(FIRST_CHAR STREQUAL "/") + else(FIRST_CHAR STREQUAL "/" OR SECOND_CHAR STREQUAL ":") set(HEADERS ${HEADERS} ${Anope_SOURCE_DIR}/include/${HEADER}) - endif(FIRST_CHAR STREQUAL "/") + endif(FIRST_CHAR STREQUAL "/" OR SECOND_CHAR STREQUAL ":") endforeach(HEADER) endif(${SRC}_HEADERS) if(HEADERS) @@ -52,7 +53,11 @@ foreach(SRC ${PROTOCOL_SRCS}) add_library(${SO} MODULE ${SRC}) add_dependencies(${SO} services) #set_target_properties(${SO} PROPERTIES PREFIX "" SUFFIX "" COMPILE_FLAGS ${CXXFLAGS}) - set_target_properties(${SO} PROPERTIES PREFIX "" SUFFIX "") + set_target_properties(${SO} PROPERTIES PREFIX "" SUFFIX "" LINK_FLAGS "${LDFLAGS}") + if(WIN32) + target_link_libraries(${SO} services wsock32) + endif(WIN32) + #set_target_properties(${SO} PROPERTIES PREFIX "" SUFFIX "") install(TARGETS ${SO} DESTINATION "${DATADIR}/modules" ) |
