Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
83fa5480
Commit
83fa5480
authored
Nov 10, 2021
by
Edward Thomson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmake: refactor WinHTTP selection
Move WinHTTP selection into its own cmake module.
parent
e35a22a0
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
18 deletions
+18
-18
cmake/SelectWinHTTP.cmake
+17
-0
src/CMakeLists.txt
+1
-18
No files found.
cmake/SelectWinHTTP.cmake
0 → 100644
View file @
83fa5480
if
(
WIN32 AND WINHTTP
)
set
(
GIT_WINHTTP 1
)
# 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
if
(
MINGW
)
add_subdirectory
(
"
${
libgit2_SOURCE_DIR
}
/deps/winhttp"
"
${
libgit2_BINARY_DIR
}
/deps/winhttp"
)
list
(
APPEND LIBGIT2_LIBS winhttp
)
list
(
APPEND LIBGIT2_DEPENDENCY_INCLUDES
"
${
libgit2_SOURCE_DIR
}
/deps/winhttp"
)
else
()
list
(
APPEND LIBGIT2_LIBS
"winhttp"
)
list
(
APPEND LIBGIT2_PC_LIBS
"-lwinhttp"
)
endif
()
list
(
APPEND LIBGIT2_LIBS
"rpcrt4"
"crypt32"
"ole32"
)
list
(
APPEND LIBGIT2_PC_LIBS
"-lrpcrt4"
"-lcrypt32"
"-lole32"
)
endif
()
src/CMakeLists.txt
View file @
83fa5480
...
@@ -93,29 +93,12 @@ if(WIN32 AND EMBED_SSH_PATH)
...
@@ -93,29 +93,12 @@ if(WIN32 AND EMBED_SSH_PATH)
set
(
GIT_SSH 1
)
set
(
GIT_SSH 1
)
endif
()
endif
()
if
(
WIN32 AND USE_WINHTTP
)
set
(
GIT_WINHTTP 1
)
# 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
if
(
MINGW
)
add_subdirectory
(
"
${
libgit2_SOURCE_DIR
}
/deps/winhttp"
"
${
libgit2_BINARY_DIR
}
/deps/winhttp"
)
list
(
APPEND LIBGIT2_LIBS winhttp
)
list
(
APPEND LIBGIT2_INCLUDES
"
${
libgit2_SOURCE_DIR
}
/deps/winhttp"
)
else
()
list
(
APPEND LIBGIT2_LIBS
"winhttp"
)
list
(
APPEND LIBGIT2_PC_LIBS
"-lwinhttp"
)
endif
()
list
(
APPEND LIBGIT2_LIBS
"rpcrt4"
"crypt32"
"ole32"
)
list
(
APPEND LIBGIT2_PC_LIBS
"-lrpcrt4"
"-lcrypt32"
"-lole32"
)
endif
()
include
(
SelectHTTPSBackend
)
include
(
SelectHTTPSBackend
)
include
(
SelectHashes
)
include
(
SelectHashes
)
include
(
SelectHTTPParser
)
include
(
SelectHTTPParser
)
include
(
SelectRegex
)
include
(
SelectRegex
)
include
(
SelectSSH
)
include
(
SelectSSH
)
include
(
SelectWinHTTP
)
target_sources
(
git2internal PRIVATE
${
SRC_SHA1
}
)
target_sources
(
git2internal PRIVATE
${
SRC_SHA1
}
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment