]> git.proxmox.com Git - libgit2.git/commitdiff
cmake: define GIT_HTTPS when HTTPS is supported
authorPatrick Steinhardt <ps@pks.im>
Tue, 25 Apr 2017 08:14:19 +0000 (10:14 +0200)
committerPatrick Steinhardt <ps@pks.im>
Tue, 25 Apr 2017 08:15:59 +0000 (10:15 +0200)
CMakeLists.txt
src/settings.c
tests/online/badssl.c

index d5bf21f546e725e88e39244b15827306000287a4..ca52db79cd1c4b55b6be86dd3e092c82b8693260 100644 (file)
@@ -238,6 +238,7 @@ ENDIF()
 
 IF (WIN32 AND WINHTTP)
        ADD_DEFINITIONS(-DGIT_WINHTTP)
+       ADD_DEFINITIONS(-DGIT_HTTPS)
 
        # Since MinGW does not come with headers or an import library for winhttp,
        # we have to include a private header and generate our own import library
@@ -546,11 +547,13 @@ ENDIF()
 
 IF (SECURITY_FOUND)
   ADD_DEFINITIONS(-DGIT_SECURE_TRANSPORT)
+  ADD_DEFINITIONS(-DGIT_HTTPS)
   INCLUDE_DIRECTORIES(${SECURITY_INCLUDE_DIR})
 ENDIF ()
 
 IF (OPENSSL_FOUND)
   ADD_DEFINITIONS(-DGIT_OPENSSL)
+  ADD_DEFINITIONS(-DGIT_HTTPS)
   INCLUDE_DIRECTORIES(${OPENSSL_INCLUDE_DIR})
   SET(SSL_LIBRARIES ${OPENSSL_LIBRARIES})
 ENDIF()
index 07ac16a8f730416319133203d34c88222887abd9..42f247aaeaa2c7201ab8aa7b57d9a5ba531d2069 100644 (file)
@@ -31,7 +31,7 @@ int git_libgit2_features(void)
 #ifdef GIT_THREADS
                | GIT_FEATURE_THREADS
 #endif
-#if defined(GIT_OPENSSL) || defined(GIT_WINHTTP) || defined(GIT_SECURE_TRANSPORT)
+#ifdef GIT_HTTPS
                | GIT_FEATURE_HTTPS
 #endif
 #if defined(GIT_SSH)
index aa4c24d9c168b29ed312c768d264ea7af1d64257..6524fcd8eeec97da0d9c4f932b9bab2670e10985 100644 (file)
@@ -4,7 +4,7 @@
 
 static git_repository *g_repo;
 
-#if defined(GIT_OPENSSL) || defined(GIT_WINHTTP) || defined(GIT_SECURE_TRANSPORT)
+#ifdef GIT_HTTPS
 static bool g_has_ssl = true;
 #else
 static bool g_has_ssl = false;