From 98bdd9749a0e7d8d9e34d584233c99533066aa26 Mon Sep 17 00:00:00 2001 From: Adam Date: Sat, 30 Oct 2010 20:12:52 -0400 Subject: Fixed build on cmake2.6 --- modules/CMakeLists.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'modules') 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) -- cgit