summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorSimon Warta <simon@kullo.net>2019-04-05 16:57:03 +0200
committerMarcel Raad <Marcel.Raad@teamviewer.com>2019-04-06 17:54:41 +0200
commitcd3edb08271a32a9c705f3c6e3364c1bdc8ac19f (patch)
tree2c6d52d55ce2588cc3462beeafb06dc7f5db1ee9 /CMakeLists.txt
parent1a3aa5c32117e94d8838c8ec85a68e8ae83898c5 (diff)
downloadcurl-cd3edb08271a32a9c705f3c6e3364c1bdc8ac19f.tar.gz
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
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt17
1 files changed, 13 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6f513c2bc..783b619ef 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1179,10 +1179,7 @@ endfunction()
# Clear list and try to detect available features
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)
+_add_if("SSL" SSL_ENABLED)
_add_if("IPv6" ENABLE_IPV6)
_add_if("unix-sockets" USE_UNIX_SOCKETS)
_add_if("libz" HAVE_LIBZ)
@@ -1245,6 +1242,18 @@ endif()
string(REPLACE ";" " " SUPPORT_PROTOCOLS "${_items}")
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.
set(CC "${CMAKE_C_COMPILER}")
# TODO probably put a -D... options here?