summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorDon <don.j.olmstead@gmail.com>2022-06-28 15:33:25 -0700
committerDaniel Stenberg <daniel@haxx.se>2022-07-05 10:09:40 +0200
commit7f8b36b074b953ecf133b64c63caaaaf8017739a (patch)
treefcd96c45a4d3933bcb8e8b3bc07d7ef34509831e /CMakeLists.txt
parent3622bf4e79ccbc9bd7890be9e732a89c99de8416 (diff)
downloadcurl-7f8b36b074b953ecf133b64c63caaaaf8017739a.tar.gz
cmake: support ngtcp2 boringssl backend
Update the ngtcp2 find module to detect the boringssl backend. Determine if the underlying OpenSSL implementation is BoringSSL and if so use that as the ngtcp2 backend. Reviewed-by: Jakub Zakrzewski Closes #9065
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt9
1 files changed, 7 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5350e8798..5ecb944c7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -451,6 +451,7 @@ if(CURL_USE_OPENSSL)
check_symbol_exists(RAND_status "${CURL_INCLUDES}" HAVE_RAND_STATUS)
check_symbol_exists(RAND_screen "${CURL_INCLUDES}" HAVE_RAND_SCREEN)
check_symbol_exists(RAND_egd "${CURL_INCLUDES}" HAVE_RAND_EGD)
+ check_symbol_exists(OPENSSL_IS_BORINGSSL "openssl/base.h" HAVE_BORINGSSL)
add_definitions(-DOPENSSL_SUPPRESS_DEPRECATED)
endif()
@@ -506,7 +507,7 @@ function(CheckQuicSupportInOpenSSL)
set(CMAKE_REQUIRED_LIBRARIES "${OPENSSL_LIBRARIES}")
check_symbol_exists(SSL_CTX_set_quic_method "openssl/ssl.h" HAVE_SSL_CTX_SET_QUIC_METHOD)
if(NOT HAVE_SSL_CTX_SET_QUIC_METHOD)
- message(FATAL_ERROR "QUIC support is missing in OpenSSL/boringssl. Try setting -DOPENSSL_ROOT_DIR")
+ message(FATAL_ERROR "QUIC support is missing in OpenSSL/BoringSSL. Try setting -DOPENSSL_ROOT_DIR")
endif()
cmake_pop_check_state()
endfunction()
@@ -514,7 +515,11 @@ endfunction()
option(USE_NGTCP2 "Use ngtcp2 and nghttp3 libraries for HTTP/3 support" OFF)
if(USE_NGTCP2)
if(USE_OPENSSL)
- find_package(NGTCP2 REQUIRED OpenSSL)
+ if(HAVE_BORINGSSL)
+ find_package(NGTCP2 REQUIRED BoringSSL)
+ else()
+ find_package(NGTCP2 REQUIRED OpenSSL)
+ endif()
CheckQuicSupportInOpenSSL()
elseif(USE_GNUTLS)
# TODO add GnuTLS support as vtls library.