]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
cmake: check USE_WINDOWS_SSPI when adding secur32 to CURL_LIBS
authorJoel Depooter <joel.depooter@safe.com>
Tue, 24 Jun 2025 01:14:24 +0000 (18:14 -0700)
committerViktor Szakats <commit@vsz.me>
Tue, 24 Jun 2025 07:57:42 +0000 (09:57 +0200)
Instead of CURL_WINDOWS_SSPI.

When running CMake on Windows with no additional parameters (ie default
build configuration), the generated project files do not include the
`secur32.lib` library in the linker settings. This is because
the relevant check was looking at `CURL_WINDOWS_SSPI` instead of
`USE_WINDOWS_SSPI`.

`USE_WINDOWS_SSPI` is enabled when building with SChannel (the default
on Windows), or if `CURL_WINDOWS_SSPI` is specified on the command line.

Follow-up to 0d71b18153c8edb996738f8a362373fc72d0013b #17413

Closes #17728

CMakeLists.txt

index d3c91e2f3fb37b0ebd83e9f1ce62ee97b2f738f4..c0cc0c57b8eee22667f8fc39506cbe275977fc48 100644 (file)
@@ -1978,7 +1978,7 @@ if(WIN32)
     endif()
     list(APPEND CURL_LIBS "${_win32_crypt32}")
   endif()
-  if(CURL_WINDOWS_SSPI)
+  if(USE_WINDOWS_SSPI)
     list(APPEND CURL_LIBS "${_win32_secur32}")
   endif()
 endif()