From 842ed0e1b5a0db1ab0575b8768b7aa480fa11dc0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20=C5=81oskot?= Date: Wed, 3 Feb 2021 20:47:22 +0100 Subject: Enable linking against static cURL on Windows This is preliminary fix to allow linking the library as well as its dependants (e.g. PROJ apps) against cURL built as static library on Windows with support of native Windows TLS/SSL. On Windows, such static cURL (and its dependants) requires linking against Winsock, CryptoAPI and other networking libaries. --- src/lib_proj.cmake | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/lib_proj.cmake b/src/lib_proj.cmake index 2a248a70..fdb212c7 100644 --- a/src/lib_proj.cmake +++ b/src/lib_proj.cmake @@ -409,7 +409,14 @@ endif() if(CURL_ENABLED) target_compile_definitions(${PROJ_CORE_TARGET} PRIVATE -DCURL_ENABLED) target_include_directories(${PROJ_CORE_TARGET} PRIVATE ${CURL_INCLUDE_DIR}) - target_link_libraries(${PROJ_CORE_TARGET} PRIVATE ${CURL_LIBRARY}) + target_link_libraries(${PROJ_CORE_TARGET} + PRIVATE + ${CURL_LIBRARY} + $<$:ws2_32> + $<$:wldap32> + $<$:advapi32> + $<$:crypt32> + $<$:normaliz>) endif() if(MSVC AND BUILD_SHARED_LIBS) -- cgit v1.2.3