From: Viktor Szakats Date: Wed, 4 Sep 2024 08:54:36 +0000 (+0200) Subject: cmake: restore variable names `CURL_CA_BUNDLE_SET`/`CURL_CA_PATH_SET` X-Git-Tag: curl-8_10_0~48 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6a9b71037a441eac28d3c7f629ac5801c01f99e2;p=thirdparty%2Fcurl.git cmake: restore variable names `CURL_CA_BUNDLE_SET`/`CURL_CA_PATH_SET` 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 --- diff --git a/CMakeLists.txt b/CMakeLists.txt index f8760fa87e..36f6821475 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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()