diff options
author | Edward Thomson <ethomson@microsoft.com> | 2013-10-25 13:23:46 -0400 |
---|---|---|
committer | Edward Thomson <ethomson@microsoft.com> | 2013-10-25 13:23:46 -0400 |
commit | 1bfe7133e022871bd9e8f0bada14ccb8ec688a2e (patch) | |
tree | f80f84fad96382dc4b58de8ee7af8e12a46bcdd0 | |
parent | fd5d80d25ae50b9f6491868e4e5c06ea017bbdb0 (diff) | |
download | libgit2-1bfe7133e022871bd9e8f0bada14ccb8ec688a2e.tar.gz |
Allow -DWINHTTP=OFF to disable WinHTTP
-rw-r--r-- | CMakeLists.txt | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 6010b63a6..a14abae0a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -48,6 +48,10 @@ IF(MSVC) # This option must match the settings used in your program, in particular if you # are linking statically OPTION( STATIC_CRT "Link the static CRT libraries" ON ) + + # 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 ) ENDIF() # This variable will contain the libraries we need to put into @@ -120,7 +124,7 @@ SET(LIBGIT2_VERSION_STRING "${LIBGIT2_VERSION_MAJOR}.${LIBGIT2_VERSION_MINOR}.${ # Find required dependencies INCLUDE_DIRECTORIES(src include) -IF (WIN32 AND NOT MINGW) +IF (WIN32 AND WINHTTP AND NOT MINGW) ADD_DEFINITIONS(-DGIT_WINHTTP) ELSE () IF (NOT AMIGA) |