]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
cmake: fix Windows check for CryptAcquireContext
authorALittleDruid <297957399@qq.com>
Sat, 28 Jan 2023 12:23:25 +0000 (20:23 +0800)
committerJay Satiro <raysatiro@yahoo.com>
Sun, 19 Feb 2023 00:00:24 +0000 (19:00 -0500)
Check for CryptAcquireContext in windows.h and wincrypt.h only, since
otherwise this check may fail due to third party headers not found.

Closes https://github.com/curl/curl/pull/10353

CMakeLists.txt

index cf40054f911cfc19251a7f2c95ae759200d64874..eb998fb0f3572c98d3d5cf0f4d8ef15832242bf1 100644 (file)
@@ -1277,7 +1277,7 @@ if(WIN32)
 
   # Check if crypto functions in wincrypt.h are actually available
   if(HAVE_WINCRYPT_H)
-    check_symbol_exists(CryptAcquireContext "${CURL_INCLUDES}" USE_WINCRYPT)
+    check_symbol_exists(CryptAcquireContext "windows.h;wincrypt.h" USE_WINCRYPT)
   endif()
   if(USE_WINCRYPT)
     set(USE_WIN32_CRYPTO ON)