]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
cmake: restore variable names `CURL_CA_BUNDLE_SET`/`CURL_CA_PATH_SET`
authorViktor Szakats <commit@vsz.me>
Wed, 4 Sep 2024 08:54:36 +0000 (10:54 +0200)
committerViktor Szakats <commit@vsz.me>
Wed, 4 Sep 2024 10:11:23 +0000 (12:11 +0200)
They were renamed recently as internal variables, but they are both
cached, so let's keep the original names for consistency and
compatibility.

Partial revert of c2889a7b4180fc963ae30811f59ab547b6eb03cd #14388
Tested via #14778

CMakeLists.txt

index f8760fa87e1c5889e100a371ef093f39855db52c..36f682147553f1dc8dff5368f8045cfdda556d50 100644 (file)
@@ -1282,9 +1282,9 @@ if(_curl_ca_bundle_supported)
       set(_curl_ca_bundle_autodetect TRUE)
     endif()
   else()
-    set(_curl_ca_bundle_set TRUE)
+    set(CURL_CA_BUNDLE_SET TRUE)
   endif()
-  mark_as_advanced(_curl_ca_bundle_set)
+  mark_as_advanced(CURL_CA_BUNDLE_SET)
 
   if(CURL_CA_PATH STREQUAL "")
     message(FATAL_ERROR "Invalid value of CURL_CA_PATH. Use 'none', 'auto' or directory path.")
@@ -1296,13 +1296,13 @@ if(_curl_ca_bundle_supported)
       set(_curl_ca_path_autodetect TRUE)
     endif()
   else()
-    set(_curl_ca_path_set TRUE)
+    set(CURL_CA_PATH_SET TRUE)
   endif()
-  mark_as_advanced(_curl_ca_path_set)
+  mark_as_advanced(CURL_CA_PATH_SET)
 
-  if(_curl_ca_bundle_set AND _curl_ca_path_autodetect)
+  if(CURL_CA_BUNDLE_SET AND _curl_ca_path_autodetect)
     # Skip auto-detection of unset CA path because CA bundle is set explicitly
-  elseif(_curl_ca_path_set AND _curl_ca_bundle_autodetect)
+  elseif(CURL_CA_PATH_SET AND _curl_ca_bundle_autodetect)
     # Skip auto-detection of unset CA bundle because CA path is set explicitly
   elseif(_curl_ca_bundle_autodetect OR _curl_ca_path_autodetect)
     # First try auto-detecting a CA bundle, then a CA path
@@ -1318,13 +1318,13 @@ if(_curl_ca_bundle_supported)
           message(STATUS "Found CA bundle: ${_search_ca_bundle_path}")
           set(CURL_CA_BUNDLE "${_search_ca_bundle_path}" CACHE
             STRING "Path to the CA bundle. Set 'none' to disable or 'auto' for auto-detection. Defaults to 'auto'.")
-          set(_curl_ca_bundle_set TRUE CACHE BOOL "Path to the CA bundle has been set")
+          set(CURL_CA_BUNDLE_SET TRUE CACHE BOOL "Path to the CA bundle has been set")
           break()
         endif()
       endforeach()
     endif()
 
-    if(_curl_ca_path_autodetect AND NOT _curl_ca_path_set)
+    if(_curl_ca_path_autodetect AND NOT CURL_CA_PATH_SET)
       set(_search_ca_path "/etc/ssl/certs")
       file(GLOB _curl_ca_files_found "${_search_ca_path}/[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f].0")
       if(_curl_ca_files_found)
@@ -1332,7 +1332,7 @@ if(_curl_ca_bundle_supported)
         message(STATUS "Found CA path: ${_search_ca_path}")
         set(CURL_CA_PATH "${_search_ca_path}" CACHE
           STRING "Location of default CA path. Set 'none' to disable or 'auto' for auto-detection. Defaults to 'auto'.")
-        set(_curl_ca_path_set TRUE CACHE BOOL "Path to the CA bundle has been set")
+        set(CURL_CA_PATH_SET TRUE CACHE BOOL "Path to the CA bundle has been set")
       endif()
     endif()
   endif()