summaryrefslogtreecommitdiffstats
path: root/cmake/SelectHTTPSBackend.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/SelectHTTPSBackend.cmake')
-rw-r--r--cmake/SelectHTTPSBackend.cmake12
1 files changed, 8 insertions, 4 deletions
diff --git a/cmake/SelectHTTPSBackend.cmake b/cmake/SelectHTTPSBackend.cmake
index d149416..d293001 100644
--- a/cmake/SelectHTTPSBackend.cmake
+++ b/cmake/SelectHTTPSBackend.cmake
@@ -55,6 +55,10 @@ if(USE_HTTPS)
set(GIT_OPENSSL 1)
list(APPEND LIBGIT2_SYSTEM_INCLUDES ${OPENSSL_INCLUDE_DIR})
list(APPEND LIBGIT2_SYSTEM_LIBS ${OPENSSL_LIBRARIES})
+ # Static OpenSSL (lib crypto.a) requires libdl, include it explicitly
+ if(LINK_WITH_STATIC_LIBRARIES STREQUAL ON)
+ list(APPEND LIBGIT2_SYSTEM_LIBS ${CMAKE_DL_LIBS})
+ endif()
list(APPEND LIBGIT2_PC_LIBS ${OPENSSL_LDFLAGS})
list(APPEND LIBGIT2_PC_REQUIRES "openssl")
elseif(USE_HTTPS STREQUAL "mbedTLS")
@@ -109,8 +113,8 @@ if(USE_HTTPS)
elseif(USE_HTTPS STREQUAL "Schannel")
set(GIT_SCHANNEL 1)
- list(APPEND LIBGIT2_SYSTEM_LIBS "rpcrt4" "crypt32" "ole32" "secur32")
- list(APPEND LIBGIT2_PC_LIBS "-lrpcrt4" "-lcrypt32" "-lole32" "-lsecur32")
+ list(APPEND LIBGIT2_SYSTEM_LIBS "rpcrt4" "crypt32" "ole32")
+ list(APPEND LIBGIT2_PC_LIBS "-lrpcrt4" "-lcrypt32" "-lole32")
elseif(USE_HTTPS STREQUAL "WinHTTP")
set(GIT_WINHTTP 1)
@@ -125,8 +129,8 @@ if(USE_HTTPS)
list(APPEND LIBGIT2_PC_LIBS "-lwinhttp")
endif()
- list(APPEND LIBGIT2_SYSTEM_LIBS "rpcrt4" "crypt32" "ole32" "secur32")
- list(APPEND LIBGIT2_PC_LIBS "-lrpcrt4" "-lcrypt32" "-lole32" "-lsecur32")
+ list(APPEND LIBGIT2_SYSTEM_LIBS "rpcrt4" "crypt32" "ole32")
+ list(APPEND LIBGIT2_PC_LIBS "-lrpcrt4" "-lcrypt32" "-lole32")
elseif(USE_HTTPS STREQUAL "OpenSSL-Dynamic")
set(GIT_OPENSSL 1)
set(GIT_OPENSSL_DYNAMIC 1)