diff options
| author | lhchavez <[email protected]> | 2019-01-05 20:13:01 +0000 |
|---|---|---|
| committer | lhchavez <[email protected]> | 2019-01-05 20:28:35 +0000 |
| commit | f3c487966d53ad78e25d2e6750414009f5606dbb (patch) | |
| tree | acce726fe9695d32eedb1c4f65ea11c98f4a7ef7 /git_static.go | |
| parent | 7ae106611c9cabe9c3c30343139efbb5d7d6fc27 (diff) | |
Improve the static build script
This change:
* Uses the installed version of both the library and the pkgconfig file,
which fixes path resolution on Ubuntu Xenial.
* Uses quoting liberally so that paths with spaces in them are correctly
handled.
* Moves the build+install directories to static-build/ in the git2go
repository to avoid having a dirty vendor/libgit2 checkout.
Diffstat (limited to 'git_static.go')
| -rw-r--r-- | git_static.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/git_static.go b/git_static.go index 243669f..547ae8a 100644 --- a/git_static.go +++ b/git_static.go @@ -3,9 +3,9 @@ package git /* -#cgo windows CFLAGS: -I${SRCDIR}/vendor/libgit2/include -#cgo windows LDFLAGS: -L${SRCDIR}/vendor/libgit2/build/ -lgit2 -lwinhttp -#cgo !windows pkg-config: --static ${SRCDIR}/vendor/libgit2/build/libgit2.pc +#cgo windows CFLAGS: -I${SRCDIR}/static-build/install/include/ +#cgo windows LDFLAGS: -L${SRCDIR}/static-build/install/lib/ -lgit2 -lwinhttp +#cgo !windows pkg-config: --static ${SRCDIR}/static-build/install/lib/pkgconfig/libgit2.pc #include <git2.h> #if LIBGIT2_VER_MAJOR != 0 || LIBGIT2_VER_MINOR != 27 |
