diff options
| author | 2022-09-22 08:59:45 +0100 | |
|---|---|---|
| committer | 2022-09-22 09:08:41 +0100 | |
| commit | 13e429445f63d7fea22410dee326ef059cafbf65 (patch) | |
| tree | 746cf63bab11e49cb5c8de05c466a880e173ef04 | |
| parent | Allow building regex_posix against PCRE on Windows for link compat. (diff) | |
Add Windows extra modules to the module list instead of copying.
[skip alpine ci]
[skip macos ci]
[skip ubuntu ci]
| -rw-r--r-- | win/modules/CMakeLists.txt | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/win/modules/CMakeLists.txt b/win/modules/CMakeLists.txt index 11e86164a..36507b38a 100644 --- a/win/modules/CMakeLists.txt +++ b/win/modules/CMakeLists.txt @@ -1,7 +1,12 @@ -# These modules are supported by every version of Visual Studio we support,
-# so copy the file out of extra/
-file(COPY "${INSPIRCD_BASE}/src/modules/extra/m_ldap.cpp" DESTINATION "${INSPIRCD_BASE}/src/modules/")
-file(COPY "${INSPIRCD_BASE}/src/modules/extra/m_regex_stdlib.cpp" DESTINATION "${INSPIRCD_BASE}/src/modules/")
+# These modules can always be built on all platforms.
+file(GLOB INSPIRCD_MODULES
+ "${INSPIRCD_BASE}/src/coremods/core_*"
+ "${INSPIRCD_BASE}/src/modules/m_*")
+
+# These modules have their dependencies provided by Windows.
+list(APPEND INSPIRCD_MODULES
+ "${INSPIRCD_BASE}/src/modules/extra/m_ldap.cpp"
+ "${INSPIRCD_BASE}/src/modules/extra/m_regex_stdlib.cpp")
if(EXISTS "${CMAKE_BINARY_DIR}/conanbuildinfo.cmake")
include("${CMAKE_BINARY_DIR}/conanbuildinfo.cmake")
@@ -9,7 +14,8 @@ if(EXISTS "${CMAKE_BINARY_DIR}/conanbuildinfo.cmake") function(enable_extra NAME PACKAGE)
if(DEFINED "CONAN_${PACKAGE}_ROOT")
message("Enabling the ${NAME} module")
- file(COPY "${INSPIRCD_BASE}/src/modules/extra/m_${NAME}.cpp" DESTINATION "${INSPIRCD_BASE}/src/modules/")
+ list(APPEND INSPIRCD_MODULES "${INSPIRCD_BASE}/src/modules/extra/m_${NAME}.cpp")
+ set(INSPIRCD_MODULES ${INSPIRCD_MODULES} PARENT_SCOPE)
else()
message("Unable to enable the ${NAME} module (missing library)")
endif()
@@ -35,8 +41,6 @@ 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)
add_definitions("-DDLL_BUILD")
|
