summaryrefslogtreecommitdiff
path: root/win/modules
diff options
context:
space:
mode:
authorSadie Powell <sadie@witchery.services>2021-06-07 04:33:14 +0100
committerSadie Powell <sadie@witchery.services>2021-06-07 04:46:32 +0100
commit71841b747d41a8efca1998aa950c89b034f8d46d (patch)
tree259b35ec8fe3232d1fce14513b415384f9cde987 /win/modules
parent4a479db7f0af21eda03f1030c68c32111d41d66c (diff)
Migrate Windows builds to installing their dependencies via Conan.
Diffstat (limited to 'win/modules')
-rw-r--r--win/modules/CMakeLists.txt24
1 files changed, 24 insertions, 0 deletions
diff --git a/win/modules/CMakeLists.txt b/win/modules/CMakeLists.txt
index 2c2617e2b..a2c70e352 100644
--- a/win/modules/CMakeLists.txt
+++ b/win/modules/CMakeLists.txt
@@ -2,6 +2,26 @@
# so copy the file out of extra/
file(COPY "${INSPIRCD_BASE}/src/modules/extra/m_regex_stdlib.cpp" DESTINATION "${INSPIRCD_BASE}/src/modules/")
+if(EXISTS "${CMAKE_BINARY_DIR}/conanbuildinfo.cmake")
+ file(COPY "${INSPIRCD_BASE}/src/modules/extra/m_argon2.cpp" DESTINATION "${INSPIRCD_BASE}/src/modules/")
+ file(COPY "${INSPIRCD_BASE}/src/modules/extra/m_pgsql.cpp" DESTINATION "${INSPIRCD_BASE}/src/modules/")
+ file(COPY "${INSPIRCD_BASE}/src/modules/extra/m_mysql.cpp" DESTINATION "${INSPIRCD_BASE}/src/modules/")
+ file(COPY "${INSPIRCD_BASE}/src/modules/extra/m_regex_pcre.cpp" DESTINATION "${INSPIRCD_BASE}/src/modules/")
+ file(COPY "${INSPIRCD_BASE}/src/modules/extra/m_regex_re2.cpp" DESTINATION "${INSPIRCD_BASE}/src/modules/")
+ file(COPY "${INSPIRCD_BASE}/src/modules/extra/m_sqlite3.cpp" DESTINATION "${INSPIRCD_BASE}/src/modules/")
+
+ include("${CMAKE_BINARY_DIR}/conanbuildinfo.cmake")
+ link_directories("${CMAKE_BINARY_DIR}/extradll" "${CMAKE_BINARY_DIR}/extralib")
+
+ file(GLOB EXTRA_DLLS "${CMAKE_BINARY_DIR}/extradll/*.dll")
+ install(FILES ${EXTRA_DLLS} DESTINATION .)
+
+ conan_basic_setup(TARGETS)
+else()
+ message("Unable to build extras: conanbuildinfo.cmake does not exist in the build directory!")
+endif()
+
+
file(GLOB INSPIRCD_MODULES "${INSPIRCD_BASE}/src/coremods/core_*" "${INSPIRCD_BASE}/src/modules/m_*")
list(SORT INSPIRCD_MODULES)
@@ -31,6 +51,10 @@ foreach(MODULE_NAME ${INSPIRCD_MODULES})
add_dependencies(${SO_NAME} win32_memory)
endif(MSVC)
+ if(CONAN_CXX_FLAGS)
+ conan_target_link_libraries("${SO_NAME}")
+ endif()
+
set_target_properties(${SO_NAME} PROPERTIES
PREFIX ""
SUFFIX ""