summaryrefslogtreecommitdiff
path: root/git.go
diff options
context:
space:
mode:
authorCarlos Martín Nieto <[email protected]>2015-12-19 01:30:28 +0100
committerCarlos Martín Nieto <[email protected]>2016-11-01 00:17:51 +0100
commit9c5fb973fcc1acd7cd55e120fefef101be46e60a (patch)
tree5e4476bc3b86fff5f5962e143918cbb408dc59d7 /git.go
parent9af9dd3ad71055e60ff7af6ffd5da42960915996 (diff)
Get rid of the with-static.sh script
CGO can perform variable substitution in the directives, so we don't need to use a script to set up the variables; we can let the go tool do it for us.
Diffstat (limited to 'git.go')
-rw-r--r--git.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/git.go b/git.go
index 53b1a12..77394cf 100644
--- a/git.go
+++ b/git.go
@@ -1,6 +1,10 @@
package git
/*
+#cgo CFLAGS: -I${SRCDIR}/vendor/libgit2/include
+#cgo LDFLAGS: -L${SRCDIR}/vendor/libgit2/build/ -lgit2
+#cgo windows LDFLAGS: -lwinhttp
+#cgo !windows pkg-config: --static ${SRCDIR}/vendor/libgit2/build/libgit2.pc
#include <git2.h>
#include <git2/sys/openssl.h>