summaryrefslogtreecommitdiff
path: root/cmake/SelectHTTPSBackend.cmake
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2023-03-06 15:19:29 -0800
committerEdward Thomson <ethomson@edwardthomson.com>2023-03-06 15:19:29 -0800
commitc799fa21db8d6bb34ce195ef41b5e3ddffc888ea (patch)
tree6ed55f8bc0625c5528e74d768017bab1e3815088 /cmake/SelectHTTPSBackend.cmake
parent8164b4816230711f1aeb8e474011f496f3bfdb98 (diff)
downloadlibgit2-ethomson/schannel.tar.gz
Diffstat (limited to 'cmake/SelectHTTPSBackend.cmake')
-rw-r--r--cmake/SelectHTTPSBackend.cmake7
1 files changed, 7 insertions, 0 deletions
diff --git a/cmake/SelectHTTPSBackend.cmake b/cmake/SelectHTTPSBackend.cmake
index 20221bf9f..2d0b6d6da 100644
--- a/cmake/SelectHTTPSBackend.cmake
+++ b/cmake/SelectHTTPSBackend.cmake
@@ -19,6 +19,8 @@ if(USE_HTTPS)
message(STATUS "Security framework is too old, falling back to OpenSSL")
set(USE_HTTPS "OpenSSL")
endif()
+ elseif(USE_SCHANNEL)
+ set(USE_HTTPS "Schannel")
elseif(USE_WINHTTP)
set(USE_HTTPS "WinHTTP")
elseif(OPENSSL_FOUND)
@@ -106,6 +108,11 @@ if(USE_HTTPS)
# https://github.com/ARMmbed/mbedtls/issues/228
# For now, pass its link flags as our own
list(APPEND LIBGIT2_PC_LIBS ${MBEDTLS_LIBRARIES})
+ 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")
elseif(USE_HTTPS STREQUAL "WinHTTP")
# WinHTTP setup was handled in the WinHTTP-specific block above
elseif(USE_HTTPS STREQUAL "OpenSSL-Dynamic")