From d33c174e585940df7d144ba8e9f60108c7a80ec0 Mon Sep 17 00:00:00 2001 From: Peter Powell Date: Thu, 3 Jan 2019 13:19:07 +0000 Subject: Fix building modules which depend on vendor libs on Windows. --- win/modules/CMakeLists.txt | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'win/modules') 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) -- cgit v1.2.3