summaryrefslogtreecommitdiff
path: root/win
diff options
context:
space:
mode:
authorattilamolnar <attilamolnar@hush.com>2013-08-27 15:03:10 +0200
committerattilamolnar <attilamolnar@hush.com>2013-08-27 15:03:10 +0200
commit5384ddf545575bc27904b3534fb9d2340de7a1d7 (patch)
treebbf13f551069b3bdb2a26fa4b3eec980cc3bfc05 /win
parent6b16dbc84c748292535d1309cadf696f7828a8a4 (diff)
Fix Windows build and a few more problems
Diffstat (limited to 'win')
-rw-r--r--win/modules/CMakeLists.txt17
1 files changed, 14 insertions, 3 deletions
diff --git a/win/modules/CMakeLists.txt b/win/modules/CMakeLists.txt
index 5778d944a..386d3600d 100644
--- a/win/modules/CMakeLists.txt
+++ b/win/modules/CMakeLists.txt
@@ -8,9 +8,15 @@ list(SORT INSPIRCD_MODULES)
add_definitions("-DDLL_BUILD")
foreach(MODULE_NAME ${INSPIRCD_MODULES})
- string(REGEX REPLACE "^.*[/\\](.*).cpp$" "\\1.so" SO_NAME ${MODULE_NAME})
+ string(REGEX REPLACE "^.*[/\\](.*).cpp$" "\\1" BASE_NAME ${MODULE_NAME})
+ set(SO_NAME "${BASE_NAME}.so")
add_library(${SO_NAME} MODULE ${MODULE_NAME})
- set_target_properties(${SO_NAME} PROPERTIES PREFIX "" SUFFIX "")
+ set_target_properties(${SO_NAME} PROPERTIES
+ PREFIX ""
+ SUFFIX ""
+ COMPILE_DEFINITIONS "MODNAME=\"${BASE_NAME}\""
+ )
+
target_link_libraries(${SO_NAME} inspircd)
add_dependencies(${SO_NAME} inspircd)
if(MSVC)
@@ -24,7 +30,12 @@ file(GLOB INSPIRCD_MODULES_SPANNINGTREE RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "${
list(SORT INSPIRCD_MODULES_SPANNINGTREE)
add_library(m_spanningtree.so MODULE ${INSPIRCD_MODULES_SPANNINGTREE})
-set_target_properties(m_spanningtree.so PROPERTIES PREFIX "" SUFFIX "")
+set_target_properties(m_spanningtree.so PROPERTIES
+ PREFIX ""
+ SUFFIX ""
+ COMPILE_DEFINITIONS "MODNAME=\"m_spanningtree\""
+)
+
target_link_libraries(m_spanningtree.so inspircd)
add_dependencies(m_spanningtree.so inspircd)
if(MSVC)