summaryrefslogtreecommitdiff
path: root/win/modules
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2013-03-14 15:19:41 -0400
committerAdam <Adam@anope.org>2013-03-14 15:19:41 -0400
commitb17ba83e9c5da3620277ff317b5f82dc397813d7 (patch)
treee3a4dfc4fb0a62172816c1c41548bb18e89dea4a /win/modules
parentade9cc213446832e818f4dd2c7d942e498cbb2d0 (diff)
Replace Windows build system and installer with cmake
Diffstat (limited to 'win/modules')
-rw-r--r--win/modules/CMakeLists.txt30
1 files changed, 30 insertions, 0 deletions
diff --git a/win/modules/CMakeLists.txt b/win/modules/CMakeLists.txt
new file mode 100644
index 000000000..70ab6d106
--- /dev/null
+++ b/win/modules/CMakeLists.txt
@@ -0,0 +1,30 @@
+file(GLOB INSPIRCD_MODULES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "${INSPIRCD_BASE}/src/commands/*.cpp" "${INSPIRCD_BASE}/src/modules/*.cpp")
+list(SORT INSPIRCD_MODULES)
+
+add_definitions("-DDLL_BUILD")
+
+foreach(MODULE_NAME ${INSPIRCD_MODULES})
+ string(REGEX REPLACE "^.*[/\\](.*).cpp$" "\\1.so" SO_NAME ${MODULE_NAME})
+ add_library(${SO_NAME} MODULE ${MODULE_NAME})
+ set_target_properties(${SO_NAME} PROPERTIES PREFIX "" SUFFIX "")
+ target_link_libraries(${SO_NAME} inspircd)
+ add_dependencies(${SO_NAME} inspircd)
+ if(MSVC)
+ target_link_libraries(${SO_NAME} win32_memory)
+ add_dependencies(${SO_NAME} win32_memory)
+ endif(MSVC)
+ install(TARGETS ${SO_NAME} DESTINATION modules)
+endforeach(MODULE_NAME ${INSPIRCD_MODULES})
+
+file(GLOB INSPIRCD_MODULES_SPANNINGTREE RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "${INSPIRCD_BASE}/src/modules/m_spanningtree/*.cpp")
+list(SORT INSPIRCD_MODULES_SPANNINGTREE)
+
+add_library(m_spanningtree.so MODULE ${INSPIRCD_MODULES_SPANNINGTREE})
+set_target_properties(m_spanningtree.so PROPERTIES PREFIX "" SUFFIX "")
+target_link_libraries(m_spanningtree.so inspircd)
+add_dependencies(m_spanningtree.so inspircd)
+if(MSVC)
+ target_link_libraries(m_spanningtree.so win32_memory)
+ add_dependencies(m_spanningtree.so win32_memory)
+endif(MSVC)
+install(TARGETS m_spanningtree.so DESTINATION modules) \ No newline at end of file