summaryrefslogtreecommitdiff
path: root/win/modules
diff options
context:
space:
mode:
authorPeter Powell <petpow@saberuk.com>2019-01-03 13:19:07 +0000
committerPeter Powell <petpow@saberuk.com>2019-01-03 13:19:07 +0000
commitd33c174e585940df7d144ba8e9f60108c7a80ec0 (patch)
tree4d9b28740a9ede181cb93280309e937a8ac8e40a /win/modules
parentb6ca49a232c24701ba72630619683672303386c8 (diff)
Fix building modules which depend on vendor libs on Windows.
Diffstat (limited to 'win/modules')
-rw-r--r--win/modules/CMakeLists.txt8
1 files changed, 8 insertions, 0 deletions
diff --git a/win/modules/CMakeLists.txt b/win/modules/CMakeLists.txt
index 2c2617e2b..094078aab 100644
--- a/win/modules/CMakeLists.txt
+++ b/win/modules/CMakeLists.txt
@@ -7,6 +7,13 @@ list(SORT INSPIRCD_MODULES)
add_definitions("-DDLL_BUILD")
+file(GLOB INSPIRCD_VENDORS "${INSPIRCD_BASE}/vendor/**")
+foreach(INSPIRCD_VENDOR ${INSPIRCD_VENDORS})
+ if(NOT IS_DIRECTORY ${INSPIRCD_VENDOR})
+ list(REMOVE_ITEM INSPIRCD_VENDORS ${INSPIRCD_VENDOR})
+ endif()
+endforeach()
+
foreach(MODULE_NAME ${INSPIRCD_MODULES})
if(IS_DIRECTORY "${MODULE_NAME}")
string(REGEX REPLACE "^.*[/\\](.*)$" "\\1" BASE_NAME ${MODULE_NAME})
@@ -26,6 +33,7 @@ foreach(MODULE_NAME ${INSPIRCD_MODULES})
# Generate the module and set its linker flags, also set it to depend on the main executable to be built beforehand
target_link_libraries(${SO_NAME} inspircd)
add_dependencies(${SO_NAME} inspircd)
+ target_include_directories(${SO_NAME} PRIVATE ${INSPIRCD_VENDORS})
if(MSVC)
target_link_libraries(${SO_NAME} win32_memory)
add_dependencies(${SO_NAME} win32_memory)