From f5a88f2978e4a8d6fe15de39497f009a81a52bf6 Mon Sep 17 00:00:00 2001 From: ALittleDruid <297957399@qq.com> Date: Sat, 28 Jan 2023 20:23:25 +0800 Subject: [PATCH] cmake: fix Windows check for CryptAcquireContext 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index cf40054f91..eb998fb0f3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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)