diff options
author | Brad King <brad.king@kitware.com> | 2022-01-07 16:42:30 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2022-01-07 16:42:30 (GMT) |
commit | 9341e63233b539be10572ffdb621e63f73582573 (patch) | |
tree | b71b1695ea66811374f78df28d7fdc0f9fd63b31 /Utilities/cmcurl | |
parent | 697e8871a1d1cf56f01866c082235ea20bd1057f (diff) | |
download | CMake-9341e63233b539be10572ffdb621e63f73582573.zip CMake-9341e63233b539be10572ffdb621e63f73582573.tar.gz CMake-9341e63233b539be10572ffdb621e63f73582573.tar.bz2 |
curl: Set build options the way we need for CMake
Diffstat (limited to 'Utilities/cmcurl')
-rw-r--r-- | Utilities/cmcurl/CMakeLists.txt | 33 | ||||
-rw-r--r-- | Utilities/cmcurl/lib/CMakeLists.txt | 2 |
2 files changed, 19 insertions, 16 deletions
diff --git a/Utilities/cmcurl/CMakeLists.txt b/Utilities/cmcurl/CMakeLists.txt index cd5e0a8..7cb497b 100644 --- a/Utilities/cmcurl/CMakeLists.txt +++ b/Utilities/cmcurl/CMakeLists.txt @@ -3,10 +3,17 @@ set(BUILD_CURL_EXE OFF CACHE INTERNAL "No curl exe") set(BUILD_DASHBOARD_REPORTS OFF CACHE INTERNAL "No curl dashboard reports") set(BUILD_RELEASE_DEBUG_DIRS OFF CACHE INTERNAL "No curl release/debug dirs") set(BUILD_SHARED_LIBS OFF CACHE INTERNAL "Build shared libraries") -set(CMAKE_USE_GSSAPI OFF CACHE INTERNAL "Disable curl gssapi") -set(CMAKE_USE_LIBSSH2 OFF CACHE INTERNAL "Disable curl libssh2") -set(CMAKE_USE_LIBSSH OFF) -set(CMAKE_USE_OPENLDAP OFF CACHE INTERNAL "No curl OpenLDAP") +set(CURL_USE_BEARSSL OFF) +set(CURL_USE_GSSAPI OFF) +set(CURL_USE_LIBSSH2 OFF) +set(CURL_USE_LIBSSH OFF) +set(CURL_USE_MBEDTLS OFF) +set(CURL_USE_NSS OFF) +set(CURL_USE_OPENLDAP OFF) +set(CURL_USE_OPENSSL "${CMAKE_USE_OPENSSL}") +set(CURL_USE_SCHANNEL OFF) +set(CURL_USE_SECTRANSP OFF) +set(CURL_USE_WOLFSSL OFF) set(CURL_BROTLI OFF) set(CURL_DISABLE_ALTSVC ON) set(CURL_DISABLE_COOKIES OFF CACHE INTERNAL "Do not disable curl cookie support") @@ -66,11 +73,10 @@ set(USE_NGTCP2 OFF) set(USE_QUICHE OFF) set(USE_WIN32_IDN OFF) set(USE_WIN32_LDAP OFF CACHE INTERNAL "No curl Windows LDAP") -if(CMAKE_USE_OPENSSL) +if(CURL_USE_OPENSSL) elseif(WIN32) - unset(CMAKE_USE_WINSSL CACHE) - set(CMAKE_USE_SCHANNEL ON) - set(CURL_WINDOWS_SSPI ON CACHE INTERNAL "Use windows libraries to allow NTLM authentication without openssl") + set(CURL_USE_SCHANNEL ON) + set(CURL_WINDOWS_SSPI ON) elseif(APPLE) # Use OS X SSL/TLS native implementation if available on target version. if(CMAKE_OSX_DEPLOYMENT_TARGET) @@ -84,16 +90,11 @@ elseif(APPLE) endif() if(NOT OSX_VERSION VERSION_LESS 10.6 AND CMAKE_C_COMPILER_ID MATCHES "GNU|LCC|Clang|AppleClang") - set(CMAKE_USE_SECTRANSP ON CACHE INTERNAL "enable Apple OS native SSL/TLS") + set(CURL_USE_SECTRANSP ON) else() - set(CMAKE_USE_SECTRANSP OFF CACHE INTERNAL "enable Apple OS native SSL/TLS") + set(CURL_USE_SECTRANSP OFF) endif() - unset(CMAKE_USE_DARWINSSL CACHE) endif() -set(CMAKE_USE_MBEDTLS OFF CACHE INTERNAL "Enable mbedTLS for SSL/TLS") -set(CMAKE_USE_BEARSSL OFF CACHE INTERNAL "Enable BearSSL for SSL/TLS") -set(CMAKE_USE_NSS OFF CACHE INTERNAL "Enable NSS for SSL/TLS") -set(CMAKE_USE_WOLFSSL OFF) # Windows Vista and above have inet_pton, but this will link on # older versions and then the executable will fail to launch at @@ -490,6 +491,7 @@ if(WIN32) check_library_exists_concat("winmm" getch HAVE_LIBWINMM) endif() +if(0) # This code not needed for building within CMake. # This check below for use of deprecated symbols is only temporary and is to # be removed again after a year's service. Remove after November 25, 2022. set(CURL_RECONFIG_REQUIRED 0) @@ -531,6 +533,7 @@ if(WIN32 OR CURL_USE_SECTRANSP OR CURL_USE_SCHANNEL OR CURL_USE_MBEDTLS OR CURL_ endif() cmake_dependent_option(CURL_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) +endif() count_true(enabled_ssl_options_count CURL_USE_SCHANNEL diff --git a/Utilities/cmcurl/lib/CMakeLists.txt b/Utilities/cmcurl/lib/CMakeLists.txt index 6303b35..6cf45ad 100644 --- a/Utilities/cmcurl/lib/CMakeLists.txt +++ b/Utilities/cmcurl/lib/CMakeLists.txt @@ -82,7 +82,7 @@ endif() # For windows we want to install OPENSSL_LIBRARIES dlls # and also copy them into the build tree so that testing # can find them. -if(CMAKE_USE_OPENSSL AND OPENSSL_FOUND AND WIN32) +if(CURL_USE_OPENSSL AND OPENSSL_FOUND AND WIN32) find_file(CMAKE_EAY_DLL NAME libeay32.dll HINTS ${OPENSSL_INCLUDE_DIR}/..) find_file(CMAKE_SSL_DLL NAME ssleay32.dll HINTS ${OPENSSL_INCLUDE_DIR}/..) mark_as_advanced(CMAKE_EAY_DLL CMAKE_SSL_DLL) |