summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorRyan Mast <mast.ryan@gmail.com>2021-10-04 02:58:28 +0200
committerMarcel Raad <Marcel.Raad@teamviewer.com>2021-10-14 16:47:04 +0200
commita132b927d7e6fbf4a5331afd83193c50eb778a6b (patch)
treef4d414d6fd89d77936b465f34d90bbdf80860c86 /CMakeLists.txt
parentd36fded576709b6accfadd6375b6820a179b78ef (diff)
downloadcurl-a132b927d7e6fbf4a5331afd83193c50eb778a6b.tar.gz
cmake: add CURL_ENABLE_SSL option and make CMAKE_USE_* SSL backend options depend on it
Closes https://github.com/curl/curl/pull/7822
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt15
1 files changed, 8 insertions, 7 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 58e3c0366..1420a8878 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -343,28 +343,29 @@ endif()
# check SSL libraries
# TODO support GnuTLS
+option(CURL_ENABLE_SSL "Enable SSL support" ON)
if(CMAKE_USE_WINSSL)
message(FATAL_ERROR "The cmake option CMAKE_USE_WINSSL was renamed to CMAKE_USE_SCHANNEL.")
endif()
if(APPLE)
- option(CMAKE_USE_SECTRANSP "enable Apple OS native SSL/TLS" OFF)
+ cmake_dependent_option(CMAKE_USE_SECTRANSP "enable Apple OS native SSL/TLS" OFF CURL_ENABLE_SSL OFF)
endif()
if(WIN32)
- option(CMAKE_USE_SCHANNEL "enable Windows native SSL/TLS" OFF)
+ cmake_dependent_option(CMAKE_USE_SCHANNEL "enable Windows native SSL/TLS" OFF CURL_ENABLE_SSL OFF)
cmake_dependent_option(CURL_WINDOWS_SSPI "Use windows libraries to allow NTLM authentication without openssl" ON
CMAKE_USE_SCHANNEL OFF)
endif()
-option(CMAKE_USE_MBEDTLS "Enable mbedTLS for SSL/TLS" OFF)
-option(CMAKE_USE_BEARSSL "Enable BearSSL for SSL/TLS" OFF)
-option(CMAKE_USE_NSS "Enable NSS for SSL/TLS" OFF)
-option(CMAKE_USE_WOLFSSL "enable wolfSSL for SSL/TLS" OFF)
+cmake_dependent_option(CMAKE_USE_MBEDTLS "Enable mbedTLS for SSL/TLS" OFF CURL_ENABLE_SSL OFF)
+cmake_dependent_option(CMAKE_USE_BEARSSL "Enable BearSSL for SSL/TLS" OFF CURL_ENABLE_SSL OFF)
+cmake_dependent_option(CMAKE_USE_NSS "Enable NSS for SSL/TLS" OFF CURL_ENABLE_SSL OFF)
+cmake_dependent_option(CMAKE_USE_WOLFSSL "enable wolfSSL for SSL/TLS" OFF CURL_ENABLE_SSL OFF)
set(openssl_default ON)
if(WIN32 OR CMAKE_USE_SECTRANSP OR CMAKE_USE_SCHANNEL OR CMAKE_USE_MBEDTLS OR CMAKE_USE_NSS OR CMAKE_USE_WOLFSSL)
set(openssl_default OFF)
endif()
-option(CMAKE_USE_OPENSSL "Use OpenSSL code. Experimental" ${openssl_default})
+cmake_dependent_option(CMAKE_USE_OPENSSL "Use OpenSSL code. Experimental" ${openssl_default} CURL_ENABLE_SSL OFF)
option(CURL_DISABLE_OPENSSL_AUTO_LOAD_CONFIG "Disable automatic loading of OpenSSL configuration" OFF)
count_true(enabled_ssl_options_count