File tree Expand file tree Collapse file tree 2 files changed +18
-18
lines changed
Expand file tree Collapse file tree 2 files changed +18
-18
lines changed Original file line number Diff line number Diff line change 1+ if (WIN32 AND WINHTTP)
2+ set (GIT_WINHTTP 1)
3+
4+ # Since MinGW does not come with headers or an import library for winhttp,
5+ # we have to include a private header and generate our own import library
6+ if (MINGW)
7+ add_subdirectory ("${libgit2_SOURCE_DIR} /deps/winhttp" "${libgit2_BINARY_DIR} /deps/winhttp" )
8+ list (APPEND LIBGIT2_LIBS winhttp)
9+ list (APPEND LIBGIT2_DEPENDENCY_INCLUDES "${libgit2_SOURCE_DIR} /deps/winhttp" )
10+ else ()
11+ list (APPEND LIBGIT2_LIBS "winhttp" )
12+ list (APPEND LIBGIT2_PC_LIBS "-lwinhttp" )
13+ endif ()
14+
15+ list (APPEND LIBGIT2_LIBS "rpcrt4" "crypt32" "ole32" )
16+ list (APPEND LIBGIT2_PC_LIBS "-lrpcrt4" "-lcrypt32" "-lole32" )
17+ endif ()
Original file line number Diff line number Diff line change @@ -93,29 +93,12 @@ if(WIN32 AND EMBED_SSH_PATH)
9393 set (GIT_SSH 1)
9494endif ()
9595
96- if (WIN32 AND USE_WINHTTP)
97- set (GIT_WINHTTP 1)
98-
99- # Since MinGW does not come with headers or an import library for winhttp,
100- # we have to include a private header and generate our own import library
101- if (MINGW)
102- add_subdirectory ("${libgit2_SOURCE_DIR} /deps/winhttp" "${libgit2_BINARY_DIR} /deps/winhttp" )
103- list (APPEND LIBGIT2_LIBS winhttp)
104- list (APPEND LIBGIT2_INCLUDES "${libgit2_SOURCE_DIR} /deps/winhttp" )
105- else ()
106- list (APPEND LIBGIT2_LIBS "winhttp" )
107- list (APPEND LIBGIT2_PC_LIBS "-lwinhttp" )
108- endif ()
109-
110- list (APPEND LIBGIT2_LIBS "rpcrt4" "crypt32" "ole32" )
111- list (APPEND LIBGIT2_PC_LIBS "-lrpcrt4" "-lcrypt32" "-lole32" )
112- endif ()
113-
11496include (SelectHTTPSBackend)
11597include (SelectHashes)
11698include (SelectHTTPParser)
11799include (SelectRegex)
118100include (SelectSSH)
101+ include (SelectWinHTTP)
119102
120103target_sources (git2internal PRIVATE ${SRC_SHA1} )
121104
You can’t perform that action at this time.
0 commit comments