diff options
Diffstat (limited to 'src/core')
| -rw-r--r-- | src/core/CMakeLists.txt | 9 |
1 files changed, 7 insertions, 2 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}) |
