use system native ssl implementation if no bundled ssl lib is provided

This commit is contained in:
Jacker 2021-02-28 23:14:51 +02:00
parent c4c29b8e5b
commit 9e5f26faf1

View file

@ -178,7 +178,7 @@ if(WIN32)
elseif(BUNDLED_OPENSSL)
list(APPEND CURL_CMAKE_ARGS -DOPENSSL_ROOT_DIR=${OPENSSL_PREFIX} -DCMAKE_USE_OPENSSL=ON)
else()
list(APPEND CURL_CMAKE_ARGS -DCMAKE_USE_OPENSSL=ON)
list(APPEND CURL_CMAKE_ARGS -DCMAKE_USE_OPENSSL=OFF -DCMAKE_USE_SCHANNEL=ON)
endif()
else()
list(APPEND CURL_CMAKE_ARGS -DCMAKE_USE_OPENSSL=OFF)
@ -505,9 +505,13 @@ elseif(UNIX)
list(APPEND CURL_CONFIGURE --without-ssl --with-wolfssl=${LIBS_BINARY_DIR}/wolfssl)
elseif(BUNDLED_OPENSSL)
list(APPEND CURL_CONFIGURE --with-ssl=${LIBS_BINARY_DIR}/openssl)
else()
if(APPLE)
list(APPEND CURL_CONFIGURE --without-ssl --with-secure-transport)
else()
list(APPEND CURL_CONFIGURE --with-ssl)
endif()
endif()
else()
list(APPEND CURL_CONFIGURE --without-ssl)
endif()