aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCedric Sodhi <manday@openmail.cc>2018-11-09 20:31:11 +0100
committerCedric Sodhi <manday@openmail.cc>2018-11-09 21:25:23 +0100
commitbeefec3326c5e21a3a4dadf0e354b12f57766474 (patch)
tree6e4814455a56718e15d069961019b162fa79ae63
parente70a55220344df6c4d786466a29a187229cf8145 (diff)
Tell Mesa not to attempt X11 headers
If no X11 related things are being built, tell Mesa's eglplatform.h not to attempt inclusion of associated X11 header.
-rw-r--r--include/wlr/render/egl.h6
-rw-r--r--include/wlr/render/interface.h6
2 files changed, 12 insertions, 0 deletions
diff --git a/include/wlr/render/egl.h b/include/wlr/render/egl.h
index 30de3d26..9ba2996a 100644
--- a/include/wlr/render/egl.h
+++ b/include/wlr/render/egl.h
@@ -9,6 +9,12 @@
#ifndef WLR_RENDER_EGL_H
#define WLR_RENDER_EGL_H
+#include <wlr/config.h>
+
+#if !(defined(WLR_HAS_X11_BACKEND) || defined(WLR_HAS_WAYLAND))
+#define MESA_EGL_NO_X11_HEADERS
+#endif
+
#include <EGL/egl.h>
#include <EGL/eglext.h>
#include <pixman.h>
diff --git a/include/wlr/render/interface.h b/include/wlr/render/interface.h
index 6b80a077..9500bced 100644
--- a/include/wlr/render/interface.h
+++ b/include/wlr/render/interface.h
@@ -9,6 +9,12 @@
#ifndef WLR_RENDER_INTERFACE_H
#define WLR_RENDER_INTERFACE_H
+#include <wlr/config.h>
+
+#if !(defined(WLR_HAS_X11_BACKEND) || defined(WLR_HAS_WAYLAND))
+#define MESA_EGL_NO_X11_HEADERS
+#endif
+
#include <EGL/egl.h>
#include <EGL/eglext.h>
#include <stdbool.h>