app/internal/window,app/internal/egl: avoid X11 dependency in EGL

EGL is window system agnostic, but its egl.h header includex X11
headers by default. Use the MESA_EGL_NO_X11_HEADERS define to avoid
it, fixing the "nox11" build for systems without X11 headers installed.

Fixes #91

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2020-03-20 20:58:17 +01:00
parent 56c3edef82
commit a3101c9454
2 changed files with 2 additions and 1 deletions
+1
View File
@@ -10,6 +10,7 @@ package egl
#cgo freebsd LDFLAGS: -L/usr/local/lib
#cgo openbsd CFLAGS: -I/usr/X11R6/include
#cgo openbsd LDFLAGS: -L/usr/X11R6/lib
#cgo CFLAGS: -DMESA_EGL_NO_X11_HEADERS
#include <EGL/egl.h>
#include <EGL/eglext.h>
+1 -1
View File
@@ -13,7 +13,7 @@ import (
/*
#cgo LDFLAGS: -lwayland-egl
#cgo CFLAGS: -I/usr/include/wayland
#cgo CFLAGS: -I/usr/include/wayland -DMESA_EGL_NO_X11_HEADERS
#include <EGL/egl.h>
#include <wayland-client.h>