1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-23 08:38:49 -05:00

cmake: set SSL_BACKENDS

This groups all SSL backends into the feature "SSL" and sets the
SSL_BACKENDS analogue to configure.ac

Closes https://github.com/curl/curl/pull/3736
This commit is contained in:
Simon Warta 2019-04-05 16:57:03 +02:00 committed by Marcel Raad
parent 1a3aa5c321
commit cd3edb0827
No known key found for this signature in database
GPG Key ID: FE4D8BC5EE1701DD

View File

@ -1179,10 +1179,7 @@ endfunction()
# Clear list and try to detect available features # Clear list and try to detect available features
set(_items) set(_items)
_add_if("WinSSL" SSL_ENABLED AND USE_WINDOWS_SSPI) _add_if("SSL" SSL_ENABLED)
_add_if("OpenSSL" SSL_ENABLED AND USE_OPENSSL)
_add_if("DarwinSSL" SSL_ENABLED AND USE_DARWINSSL)
_add_if("mbedTLS" SSL_ENABLED AND USE_MBEDTLS)
_add_if("IPv6" ENABLE_IPV6) _add_if("IPv6" ENABLE_IPV6)
_add_if("unix-sockets" USE_UNIX_SOCKETS) _add_if("unix-sockets" USE_UNIX_SOCKETS)
_add_if("libz" HAVE_LIBZ) _add_if("libz" HAVE_LIBZ)
@ -1245,6 +1242,18 @@ endif()
string(REPLACE ";" " " SUPPORT_PROTOCOLS "${_items}") string(REPLACE ";" " " SUPPORT_PROTOCOLS "${_items}")
message(STATUS "Enabled protocols: ${SUPPORT_PROTOCOLS}") message(STATUS "Enabled protocols: ${SUPPORT_PROTOCOLS}")
# Clear list and collect SSL backends
set(_items)
_add_if("WinSSL" SSL_ENABLED AND USE_WINDOWS_SSPI)
_add_if("OpenSSL" SSL_ENABLED AND USE_OPENSSL)
_add_if("DarwinSSL" SSL_ENABLED AND USE_DARWINSSL)
_add_if("mbedTLS" SSL_ENABLED AND USE_MBEDTLS)
if(_items)
list(SORT _items)
endif()
string(REPLACE ";" " " SSL_BACKENDS "${_items}")
message(STATUS "Enabled SSL backends: ${SSL_BACKENDS}")
# curl-config needs the following options to be set. # curl-config needs the following options to be set.
set(CC "${CMAKE_C_COMPILER}") set(CC "${CMAKE_C_COMPILER}")
# TODO probably put a -D... options here? # TODO probably put a -D... options here?