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 <security.h>
      |          ^~~~~~~~~~~~
1 error generated.

lib/curl_sspi.h:41:10: fatal error: 'security.h' file not found
   41 | #include <security.h>
      |          ^~~~~~~~~~~~
1 error generated.
```

Cherry-picked from #17988
This commit is contained in:
Viktor Szakats 2025-07-18 23:43:32 +02:00
parent c85ee70e21
commit 8a51ff0670
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201

View file

@ -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)