From: Viktor Szakats Date: Sat, 11 Nov 2023 18:38:02 +0000 (+0000) Subject: tidy-up: dedupe Windows system libs in cmake X-Git-Tag: curl-8_5_0~111 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ff1fdfecb1396a44c4761e822bd2011d096c5c9f;p=thirdparty%2Fcurl.git tidy-up: dedupe Windows system libs in cmake Reviewed-by: Daniel Stenberg Closes #12307 --- diff --git a/CMakeLists.txt b/CMakeLists.txt index e2861c868e..9684d0c877 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -390,7 +390,7 @@ endif() check_function_exists(gethostname HAVE_GETHOSTNAME) if(WIN32) - list(APPEND CURL_LIBS "ws2_32") + list(APPEND CURL_LIBS "ws2_32" "bcrypt") if(USE_LIBRTMP) list(APPEND CURL_LIBS "winmm") endif() @@ -494,11 +494,6 @@ if(CURL_USE_OPENSSL) include_directories(${OPENSSL_INCLUDE_DIR}) endif() - if(WIN32) - list(APPEND CURL_LIBS "ws2_32") - list(APPEND CURL_LIBS "bcrypt") # for OpenSSL/LibreSSL - endif() - if(CURL_DEFAULT_SSL_BACKEND AND CURL_DEFAULT_SSL_BACKEND STREQUAL "openssl") set(valid_default_ssl_backend TRUE) endif() @@ -1437,8 +1432,6 @@ if(WIN32) if(USE_WIN32_CRYPTO OR USE_SCHANNEL) list(APPEND CURL_LIBS "advapi32" "crypt32") endif() - - list(APPEND CURL_LIBS "bcrypt") endif() if(MSVC)