summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2021-11-10 21:02:42 -0500
committerEdward Thomson <ethomson@edwardthomson.com>2021-11-11 15:56:10 -0500
commit789ab915607c3d91d8c04fd217de9bf37c631f5f (patch)
treecd838db4a89aa73c8bc28eb2f1598277b4c95c9c
parent9324d16e7356c1928d577a719eaaad264da58b13 (diff)
downloadlibgit2-789ab915607c3d91d8c04fd217de9bf37c631f5f.tar.gz
cmake: standardize USE_WINHTTP
WinHTTP can now be disabled with `USE_WINHTTP=OFF` instead of `WINHTTP=OFF` to better support the other cmake semantics.
-rw-r--r--CMakeLists.txt4
-rw-r--r--cmake/SelectHTTPSBackend.cmake2
-rw-r--r--src/CMakeLists.txt2
3 files changed, 4 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2c442d2a0..c8825e966 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -93,8 +93,8 @@ endif()
if(WIN32)
# By default, libgit2 is built with WinHTTP. To use the built-in
- # HTTP transport, invoke CMake with the "-DWINHTTP=OFF" argument.
- option(WINHTTP "Use Win32 WinHTTP routines" ON)
+ # HTTP transport, invoke CMake with the "-DUSE_WINHTTP=OFF" argument.
+ option(USE_WINHTTP "Use Win32 WinHTTP routines" ON)
endif()
diff --git a/cmake/SelectHTTPSBackend.cmake b/cmake/SelectHTTPSBackend.cmake
index 4998f0f2a..4af747417 100644
--- a/cmake/SelectHTTPSBackend.cmake
+++ b/cmake/SelectHTTPSBackend.cmake
@@ -19,7 +19,7 @@ IF(USE_HTTPS)
MESSAGE(STATUS "Security framework is too old, falling back to OpenSSL")
SET(USE_HTTPS "OpenSSL")
ENDIF()
- ELSEIF (WINHTTP)
+ ELSEIF (USE_WINHTTP)
SET(USE_HTTPS "WinHTTP")
ELSEIF(OPENSSL_FOUND)
SET(USE_HTTPS "OpenSSL")
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index de8beefd8..eed04f8ee 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -98,7 +98,7 @@ if(WIN32 AND EMBED_SSH_PATH)
set(GIT_SSH 1)
endif()
-if(WIN32 AND WINHTTP)
+if(WIN32 AND USE_WINHTTP)
set(GIT_WINHTTP 1)
# Since MinGW does not come with headers or an import library for winhttp,