mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-07 10:25:37 +00:00
app/internal: use pkg-config for finding system headers and libraries
I've resisted relying on pkg-config in the hope that hard-coded include and library paths would suffice. However, apart from having to work around some distro-specific differences, building with hardcoded include paths fails when building on a buildroot: x86_64-buildroot-linux-gnu-gcc: ERROR: unsafe header/library path used in cross-compilation: '-I/usr/include/wayland' (see #91) Andri mentions a workaround (prefixing paths with "="), but that doesn't seem to work on the BSDs. Let's see how pkg-config fares. It's an extra dependency, but it promises to keep us isolated from the varying paths on Linux distrobutions. Updates #91 Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -14,8 +14,9 @@ import (
|
||||
|
||||
/*
|
||||
#cgo CFLAGS: -Werror
|
||||
#cgo linux freebsd openbsd LDFLAGS: -lGLESv2
|
||||
#cgo linux pkg-config: glesv2
|
||||
#cgo linux freebsd LDFLAGS: -ldl
|
||||
#cgo freebsd openbsd LDFLAGS: -lGLESv2
|
||||
#cgo freebsd CFLAGS: -I/usr/local/include
|
||||
#cgo freebsd LDFLAGS: -L/usr/local/lib
|
||||
#cgo openbsd CFLAGS: -I/usr/X11R6/include
|
||||
|
||||
Reference in New Issue
Block a user