From: Viktor Szakats Date: Fri, 18 Jul 2025 21:43:32 +0000 (+0200) Subject: cmake: fix to disable Schannel and SSPI for non-Windows targets X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8a51ff0670d81719c051b7037d0b8a0a5320763e;p=thirdparty%2Fcurl.git cmake: fix to disable Schannel and SSPI for non-Windows targets Fixing: ``` In file included from lib/vtls/vtls.c:50: In file included from lib/vtls/../urldata.h:314: lib/vtls/../curl_sspi.h:41:10: fatal error: 'security.h' file not found 41 | #include | ^~~~~~~~~~~~ 1 error generated. lib/curl_sspi.h:41:10: fatal error: 'security.h' file not found 41 | #include | ^~~~~~~~~~~~ 1 error generated. ``` Cherry-picked from #17988 --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 530f54e271..10b4bd89cd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -680,6 +680,9 @@ endif() if(WIN32) cmake_dependent_option(CURL_USE_SCHANNEL "Enable Windows native SSL/TLS (Schannel)" OFF CURL_ENABLE_SSL OFF) option(CURL_WINDOWS_SSPI "Enable SSPI on Windows" ${CURL_USE_SCHANNEL}) +else() + set(CURL_USE_SCHANNEL OFF) + set(CURL_WINDOWS_SSPI OFF) endif() cmake_dependent_option(CURL_USE_MBEDTLS "Enable mbedTLS for SSL/TLS" OFF CURL_ENABLE_SSL OFF) cmake_dependent_option(CURL_USE_WOLFSSL "Enable wolfSSL for SSL/TLS" OFF CURL_ENABLE_SSL OFF)