diff options
author | Thorbjørn Lindeijer <bjorn@lindeijer.nl> | 2024-06-19 14:52:30 +0200 |
---|---|---|
committer | Thorbjørn Lindeijer <bjorn@lindeijer.nl> | 2024-06-19 15:16:28 +0200 |
commit | afb6cd827d5bdf9f1e890aefbb44516c926783d4 (patch) | |
tree | e06bf44670f0461037467656569e93cf5abecfc2 | |
parent | ac0b338b3e026d0d05a447894de9a6a994da82dc (diff) | |
download | mana-afb6cd827d5bdf9f1e890aefbb44516c926783d4.tar.gz mana-afb6cd827d5bdf9f1e890aefbb44516c926783d4.tar.bz2 mana-afb6cd827d5bdf9f1e890aefbb44516c926783d4.tar.xz mana-afb6cd827d5bdf9f1e890aefbb44516c926783d4.zip |
Fixed cURL linker issues on MSYS2
MSYS2 builds cURL 8.8 with CMake, which installs a CURLConfig.cmake
file. Since CMake 3.17, the FindCURL module will prefer to return the
values from the config file. However, CURLConfig.cmake does not set
CURL_LIBRARIES.
While a fix for this is pending release (see
https://github.com/curl/curl/commit/1dec702c8676fef3a7b5850e5350102876067680),
we can rather update to modern CMake by relying on the IMPORTED target
CURL::libcurl, which is set since CMake 3.12 (our current minimum
required version).
-rw-r--r-- | src/CMakeLists.txt | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index f993f4ed..9ced2c13 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -75,7 +75,6 @@ include_directories( ${SDL2_INCLUDE_DIRS} ${PNG_INCLUDE_DIR} ${PHYSFS_INCLUDE_DIR} - ${CURL_INCLUDE_DIR} ${LIBXML2_INCLUDE_DIR} ${ENET_INCLUDE_DIR} ${GUICHAN_INCLUDE_DIR} @@ -626,7 +625,7 @@ target_link_libraries( ${SDL2_LINK_LIBRARIES} ${PNG_LIBRARIES} ${PHYSFS_LIBRARY} - ${CURL_LIBRARIES} + CURL::libcurl ${LIBXML2_LIBRARIES} ${GUICHAN_LIBRARIES} ${OPENGL_LIBRARIES} |