1
0
mirror of https://github.com/anope/anope.git synced 2026-07-04 14:13:14 +02:00

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
This commit is contained in:
cyberbotx
2008-12-26 19:14:49 +00:00
parent 77893492da
commit 967f42b4fc
4 changed files with 36 additions and 17 deletions
+7 -2
View File
@@ -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})