diff options
author | cyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864> | 2008-12-26 19:14:49 +0000 |
---|---|---|
committer | cyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864> | 2008-12-26 19:14:49 +0000 |
commit | 967f42b4fc5cd3a43e821082e540bcb7c45b7ef8 (patch) | |
tree | 319a0eaa05fa90effeeb381d6e24850095b048b9 /src | |
parent | 77893492da6ef92f386ba7116e02fd62846e9c32 (diff) |
Minor CMake cleanup, moving include directories and defines to use include_directories and add_definitions instead.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1865 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src')
-rw-r--r-- | src/core/CMakeLists.txt | 9 | ||||
-rw-r--r-- | src/modules/CMakeLists.txt | 9 | ||||
-rw-r--r-- | src/protocol/CMakeLists.txt | 9 |
3 files changed, 21 insertions, 6 deletions
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index 7b02ac340..0a3655806 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -6,8 +6,13 @@ if(CMAKE244_OR_BETTER) list(SORT CORE_SRCS) endif(CMAKE244_OR_BETTER) +# If using Windows, add the MODULE_COMPILE define +if(WIN32) + add_definitions(-DMODULE_COMPILE) +endif(WIN32) + # Set all the files to use C++ as well as set their compile flags (use the module-specific compile flags, though) -set_source_files_properties(${CORE_SRCS} PROPERTIES LANGUAGE CXX COMPILE_FLAGS "${MODULE_CXXFLAGS}") +set_source_files_properties(${CORE_SRCS} PROPERTIES LANGUAGE CXX COMPILE_FLAGS "${CXXFLAGS}") # Iterate through all the source files foreach(SRC ${CORE_SRCS}) @@ -18,7 +23,7 @@ foreach(SRC ${CORE_SRCS}) # For Visual Studio only, include win32_memory.cpp to the list of sources, required to override Visual Studio's overrides of the new/delete operators if(MSVC) append_to_list(SRC ${Anope_SOURCE_DIR}/src/win32_memory.cpp) - set_source_files_properties(${Anope_SOURCE_DIR}/src/win32_memory.cpp LANGUAGE CXX COMPILE_FLAGS "${MODULE_CXXFLAGS}") + set_source_files_properties(${Anope_SOURCE_DIR}/src/win32_memory.cpp LANGUAGE CXX COMPILE_FLAGS "${CXXFLAGS}") endif(MSVC) # Generate the module and set it's linker flags, also set it to depend on the main Anope executable to be built beforehand add_library(${SO} MODULE ${SRC}) diff --git a/src/modules/CMakeLists.txt b/src/modules/CMakeLists.txt index aa04edaa6..0b7017180 100644 --- a/src/modules/CMakeLists.txt +++ b/src/modules/CMakeLists.txt @@ -6,8 +6,13 @@ if(CMAKE244_OR_BETTER) list(SORT MODULES_SRCS) endif(CMAKE244_OR_BETTER) +# If using Windows, add the MODULE_COMPILE define +if(WIN32) + add_definitions(-DMODULE_COMPILE) +endif(WIN32) + # Set all the files to use C++ as well as set their compile flags (use the module-specific compile flags, though) -set_source_files_properties(${MODULES_SRCS} PROPERTIES LANGUAGE CXX COMPILE_FLAGS "${MODULE_CXXFLAGS}") +set_source_files_properties(${MODULES_SRCS} PROPERTIES LANGUAGE CXX COMPILE_FLAGS "${CXXFLAGS}") # Iterate through all the source files foreach(SRC ${MODULES_SRCS}) @@ -18,7 +23,7 @@ foreach(SRC ${MODULES_SRCS}) # For Visual Studio only, include win32_memory.cpp to the list of sources, required to override Visual Studio's overrides of the new/delete operators if(MSVC) append_to_list(SRC ${Anope_SOURCE_DIR}/src/win32_memory.cpp) - set_source_files_properties(${Anope_SOURCE_DIR}/src/win32_memory.cpp LANGUAGE CXX COMPILE_FLAGS "${MODULE_CXXFLAGS}") + set_source_files_properties(${Anope_SOURCE_DIR}/src/win32_memory.cpp LANGUAGE CXX COMPILE_FLAGS "${CXXFLAGS}") endif(MSVC) # Generate the module and set it's linker flags, also set it to depend on the main Anope executable to be built beforehand add_library(${SO} MODULE ${SRC}) diff --git a/src/protocol/CMakeLists.txt b/src/protocol/CMakeLists.txt index 6fd48290e..fdb16471d 100644 --- a/src/protocol/CMakeLists.txt +++ b/src/protocol/CMakeLists.txt @@ -6,8 +6,13 @@ if(CMAKE244_OR_BETTER) list(SORT PROTOCOL_SRCS) endif(CMAKE244_OR_BETTER) +# If using Windows, add the MODULE_COMPILE define +if(WIN32) + add_definitions(-DMODULE_COMPILE) +endif(WIN32) + # Set all the files to use C++ as well as set their compile flags (use the module-specific compile flags, though) -set_source_files_properties(${PROTOCOL_SRCS} PROPERTIES LANGUAGE CXX COMPILE_FLAGS "${MODULE_CXXFLAGS}") +set_source_files_properties(${PROTOCOL_SRCS} PROPERTIES LANGUAGE CXX COMPILE_FLAGS "${CXXFLAGS}") # Iterate through all the source files foreach(SRC ${PROTOCOL_SRCS}) @@ -18,7 +23,7 @@ foreach(SRC ${PROTOCOL_SRCS}) # For Visual Studio only, include win32_memory.cpp to the list of sources, required to override Visual Studio's overrides of the new/delete operators if(MSVC) append_to_list(APPEND SRC ${Anope_SOURCE_DIR}/src/win32_memory.cpp) - set_source_files_properties(${Anope_SOURCE_DIR}/src/win32_memory.cpp LANGUAGE CXX COMPILE_FLAGS "${MODULE_CXXFLAGS}") + set_source_files_properties(${Anope_SOURCE_DIR}/src/win32_memory.cpp LANGUAGE CXX COMPILE_FLAGS "${CXXFLAGS}") endif(MSVC) # Generate the module and set it's linker flags, also set it to depend on the main Anope executable to be built beforehand add_library(${SO} MODULE ${SRC}) |