summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/modules/extra/m_mysql.cpp2
-rw-r--r--src/modules/extra/m_regex_pcre.cpp2
-rw-r--r--win/conanfile.txt34
-rw-r--r--win/modules/CMakeLists.txt24
4 files changed, 60 insertions, 2 deletions
diff --git a/src/modules/extra/m_mysql.cpp b/src/modules/extra/m_mysql.cpp
index 377ffee7e..64a460f77 100644
--- a/src/modules/extra/m_mysql.cpp
+++ b/src/modules/extra/m_mysql.cpp
@@ -56,7 +56,7 @@
#endif
#ifdef _WIN32
-# pragma comment(lib, "libmysql.lib")
+# pragma comment(lib, "mysqlclient.lib")
#endif
/* VERSION 3 API: With nonblocking (threaded) requests */
diff --git a/src/modules/extra/m_regex_pcre.cpp b/src/modules/extra/m_regex_pcre.cpp
index 17cc65bd3..6c5ecb83f 100644
--- a/src/modules/extra/m_regex_pcre.cpp
+++ b/src/modules/extra/m_regex_pcre.cpp
@@ -38,7 +38,7 @@
#include "modules/regex.h"
#ifdef _WIN32
-# pragma comment(lib, "libpcre.lib")
+# pragma comment(lib, "pcre.lib")
#endif
class PCRERegex : public Regex
diff --git a/win/conanfile.txt b/win/conanfile.txt
new file mode 100644
index 000000000..61a25f345
--- /dev/null
+++ b/win/conanfile.txt
@@ -0,0 +1,34 @@
+# Last updated: 2020-06-07
+#
+# Modules we can't legally ship: geo_maxmind, ssl_mbedtls, ssl_openssl
+# Modules which don't apply to Windows: regex_posix, sslrehashsgnal
+# Modules without packages: ldap, regex_tre, ssl_gnutls
+
+[requires]
+argon2/20190702
+# libmaxminddb/1.6.0
+libpq/13.2
+# mbedtls/2.25.0
+mysql-connector-c/6.1.11
+# openssl/1.1.1k
+pcre/8.44
+re2/20210401
+sqlite3/3.35.5
+
+[options]
+argon2:shared=True
+# libmaxminddb:shared=True
+libpq:shared=True
+# mbedtls:shared=True
+mysql-connector:shared=True
+# openssl:shared=True
+pcre:shared=True
+re2:shared=True
+sqlite3:shared=True
+
+[imports]
+., *.dll -> extradll @ keep_path=False
+., *.lib -> extralib @ keep_path=False
+
+[generators]
+cmake
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 ""