summaryrefslogtreecommitdiff
path: root/deps/ntlmclient
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2020-04-01 17:36:13 +0200
committerPatrick Steinhardt <ps@pks.im>2020-04-01 17:36:13 +0200
commit541de51516b5811d887db7249ac9e8ffe4278e7e (patch)
tree3c4a1e7828fc65130ee34acd6fc30ef92f6498cb /deps/ntlmclient
parent7d3c7057f0e774aecd6fc4ef8333e69e5c4873e0 (diff)
downloadlibgit2-541de51516b5811d887db7249ac9e8ffe4278e7e.tar.gz
cmake: streamline backend detection
We're currently doing unnecessary work to auto-detect backends even if the functionality is disabled altogether. Let's fix this by removing the extraneous FOO_BACKEND variables, instead letting auto-detection modify the variable itself.
Diffstat (limited to 'deps/ntlmclient')
-rw-r--r--deps/ntlmclient/CMakeLists.txt10
1 files changed, 5 insertions, 5 deletions
diff --git a/deps/ntlmclient/CMakeLists.txt b/deps/ntlmclient/CMakeLists.txt
index 0a1339779..43d32185a 100644
--- a/deps/ntlmclient/CMakeLists.txt
+++ b/deps/ntlmclient/CMakeLists.txt
@@ -4,20 +4,20 @@ ADD_DEFINITIONS(-DNTLM_STATIC=1)
DISABLE_WARNINGS(implicit-fallthrough)
-IF (HTTPS_BACKEND STREQUAL "SecureTransport")
+IF(USE_HTTPS STREQUAL "SecureTransport")
ADD_DEFINITIONS(-DCRYPT_COMMONCRYPTO)
SET(SRC_NTLMCLIENT_CRYPTO "crypt_commoncrypto.c")
# CC_MD4 has been deprecated in macOS 10.15.
SET_SOURCE_FILES_PROPERTIES("crypt_commoncrypto.c" COMPILE_FLAGS "-Wno-deprecated")
-ELSEIF (HTTPS_BACKEND STREQUAL "OpenSSL")
+ELSEIF(USE_HTTPS STREQUAL "OpenSSL")
ADD_DEFINITIONS(-DCRYPT_OPENSSL)
INCLUDE_DIRECTORIES(${OPENSSL_INCLUDE_DIR})
SET(SRC_NTLMCLIENT_CRYPTO "crypt_openssl.c")
-ELSEIF (HTTPS_BACKEND STREQUAL "mbedTLS")
+ELSEIF(USE_HTTPS STREQUAL "mbedTLS")
ADD_DEFINITIONS(-DCRYPT_MBEDTLS)
SET(SRC_NTLMCLIENT_CRYPTO "crypt_mbedtls.c")
-ELSE ()
- MESSAGE(FATAL_ERROR "Unable to use libgit2's HTTPS backend (${HTTPS_BACKEND}) for NTLM crypto")
+ELSE()
+ MESSAGE(FATAL_ERROR "Unable to use libgit2's HTTPS backend (${USE_HTTPS}) for NTLM crypto")
ENDIF()
ADD_LIBRARY(ntlmclient OBJECT ${SRC_NTLMCLIENT} ${SRC_NTLMCLIENT_CRYPTO})