Skip to content

Commit 789ab91

Browse files
committed
cmake: standardize USE_WINHTTP
WinHTTP can now be disabled with `USE_WINHTTP=OFF` instead of `WINHTTP=OFF` to better support the other cmake semantics.
1 parent 9324d16 commit 789ab91

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,8 @@ endif()
9393

9494
if(WIN32)
9595
# By default, libgit2 is built with WinHTTP. To use the built-in
96-
# HTTP transport, invoke CMake with the "-DWINHTTP=OFF" argument.
97-
option(WINHTTP "Use Win32 WinHTTP routines" ON)
96+
# HTTP transport, invoke CMake with the "-DUSE_WINHTTP=OFF" argument.
97+
option(USE_WINHTTP "Use Win32 WinHTTP routines" ON)
9898
endif()
9999

100100

cmake/SelectHTTPSBackend.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ IF(USE_HTTPS)
1919
MESSAGE(STATUS "Security framework is too old, falling back to OpenSSL")
2020
SET(USE_HTTPS "OpenSSL")
2121
ENDIF()
22-
ELSEIF (WINHTTP)
22+
ELSEIF (USE_WINHTTP)
2323
SET(USE_HTTPS "WinHTTP")
2424
ELSEIF(OPENSSL_FOUND)
2525
SET(USE_HTTPS "OpenSSL")

src/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ if(WIN32 AND EMBED_SSH_PATH)
9898
set(GIT_SSH 1)
9999
endif()
100100

101-
if(WIN32 AND WINHTTP)
101+
if(WIN32 AND USE_WINHTTP)
102102
set(GIT_WINHTTP 1)
103103

104104
# Since MinGW does not come with headers or an import library for winhttp,

0 commit comments

Comments
 (0)