]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
tidy-up: dedupe Windows system libs in cmake
authorViktor Szakats <commit@vsz.me>
Sat, 11 Nov 2023 18:38:02 +0000 (18:38 +0000)
committerViktor Szakats <commit@vsz.me>
Sat, 11 Nov 2023 23:09:22 +0000 (23:09 +0000)
Reviewed-by: Daniel Stenberg
Closes #12307

CMakeLists.txt

index e2861c868e369648148c877a2247808b85108048..9684d0c877259ba19a0a5c54fcd4951e41a25ae6 100644 (file)
@@ -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)