summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2010-10-30 20:12:52 -0400
committerAdam <Adam@anope.org>2010-10-30 20:12:52 -0400
commit98bdd9749a0e7d8d9e34d584233c99533066aa26 (patch)
tree63c0b0c238ddf7ac00119c0fa239b790d486d743 /modules
parentcd21bd758c9b5912953e93fa58ff111aab759b54 (diff)
Fixed build on cmake2.6
Diffstat (limited to 'modules')
-rw-r--r--modules/CMakeLists.txt8
1 files changed, 7 insertions, 1 deletions
diff --git a/modules/CMakeLists.txt b/modules/CMakeLists.txt
index 46888a416..7d3811f4e 100644
--- a/modules/CMakeLists.txt
+++ b/modules/CMakeLists.txt
@@ -68,7 +68,13 @@ foreach(MODULE_FOLDER ${MODULES_FOLDERS})
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})
- set_target_properties(${SO} PROPERTIES LINKER_LANGUAGE CXX PREFIX "" SUFFIX "" LINK_FLAGS "${TEMP_LDFLAGS} /nodefaultlib:\"libcmt.lib\"")
+ # Windows requires this because it's weird
+ if(WIN32)
+ set(WIN32_NO_LIBS "/nodefaultlib:\"libcmt.lib\"")
+ else(WIN32)
+ set(WIN32_NO_LIBS)
+ endif(WIN32)
+ set_target_properties(${SO} PROPERTIES LINKER_LANGUAGE CXX PREFIX "" SUFFIX "" LINK_FLAGS "${TEMP_LDFLAGS} ${WIN32_NO_LIBS}")
add_dependencies(${SO} ${PROGRAM_NAME})
# For Windows only, have the module link to the export library of Anope as well as the wsock32 library (most of the modules probably don't need this, but this is to be on the safe side), also set it's version
if(WIN32)