]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
cmake: fix to disable Schannel and SSPI for non-Windows targets
authorViktor Szakats <commit@vsz.me>
Fri, 18 Jul 2025 21:43:32 +0000 (23:43 +0200)
committerViktor Szakats <commit@vsz.me>
Wed, 23 Jul 2025 17:53:44 +0000 (19:53 +0200)
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

CMakeLists.txt

index 530f54e2713d78b27787f6f34569c41b0c351da3..10b4bd89cd79966e37b79769a192ef97a506f01f 100644 (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)