From 0903cac1d08817e87c556f5a3e6ec881be86c7f2 Mon Sep 17 00:00:00 2001 From: Edward Thomson Date: Wed, 11 Aug 2021 01:30:38 +0100 Subject: openssl: dynamically load libssl and symbols (optionally) Provide an interface around OpenSSL to dynamically load the libraries and symbols, so that users can distribute a libgit2 library that is not linked directly against OpenSSL. This enables users to target multiple distributions with a single binary. This mechanism is optional and disabled by default. Configure cmake with -DUSE_HTTPS=OpenSSL-Dynamic to use it. --- cmake/SelectHTTPSBackend.cmake | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'cmake') diff --git a/cmake/SelectHTTPSBackend.cmake b/cmake/SelectHTTPSBackend.cmake index afbeac424..4998f0f2a 100644 --- a/cmake/SelectHTTPSBackend.cmake +++ b/cmake/SelectHTTPSBackend.cmake @@ -108,6 +108,10 @@ IF(USE_HTTPS) LIST(APPEND LIBGIT2_PC_LIBS ${MBEDTLS_LIBRARIES}) ELSEIF (USE_HTTPS STREQUAL "WinHTTP") # WinHTTP setup was handled in the WinHTTP-specific block above + ELSEIF (USE_HTTPS STREQUAL "OpenSSL-Dynamic") + SET(GIT_OPENSSL 1) + SET(GIT_OPENSSL_DYNAMIC 1) + LIST(APPEND LIBGIT2_LIBS dl) ELSE() MESSAGE(FATAL_ERROR "Asked for backend ${USE_HTTPS} but it wasn't found") ENDIF() -- cgit v1.2.1