diff options
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}) |