diff options
| author | Ryan Graham <[email protected]> | 2018-05-08 15:47:34 -0700 |
|---|---|---|
| committer | Ryan Graham <[email protected]> | 2018-08-23 10:45:27 -0700 |
| commit | b3256d9058aa93176190cb69f73afb72f0730100 (patch) | |
| tree | 31abcd4ef8d87b72cecdc242738a46082cd86e94 /script/build-libgit2-static.sh | |
| parent | 5280ceb7514c7eb4cfcaaf33a13ee580cd9bc2e0 (diff) | |
static: use pkg-config exclusively when using it
When using the static linking option on platforms that use pkg-config,
use ONLY pkg-config to get the CFLAGS and LDFLAGS. This prevents pulling
in dependencies and flags for any non-vendored version that may be
present on the host.
The main practical effect of this is that if someone doesn't need/want
any sort of remote access support at all they can completely disable
libcurl, libssh2, libssl, etc and produce a smaller/simpler binary and
greatly simplify their build-time dependencies. When done properly, the
generated pkg-config file will tell cgo everything it needs to know.
This also prevents confusion if there is a system copy of libgit2 that
is being given priority over the vendored build.
Signed-off-by: Ryan Graham <[email protected]>
Diffstat (limited to 'script/build-libgit2-static.sh')
| -rwxr-xr-x | script/build-libgit2-static.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/script/build-libgit2-static.sh b/script/build-libgit2-static.sh index 5723721..1568ece 100755 --- a/script/build-libgit2-static.sh +++ b/script/build-libgit2-static.sh @@ -16,4 +16,4 @@ cmake -DTHREADSAFE=ON \ -DCMAKE_INSTALL_PREFIX=../install \ .. && -cmake --build . +cmake --build . --target install |
