From: Emil Velikov <emil.veli...@collabora.com>

The vl_*_screen_create API properly falls back to a NOP when we're
building without specific platforms. So the only thing we need is to
handle the lack of X11/Xlib.h and provide a dummy Display define.

Cc: <mesa-sta...@lists.freedesktop.org>
Cc: Christian König <christian.koe...@amd.com>
Signed-off-by: Emil Velikov <emil.veli...@collabora.com>
---
Christian,

Do you prefer if we should print an error message, error out, or
continue with the other platform if the requested one is missing?
---
 src/gallium/state_trackers/omx/entrypoint.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/gallium/state_trackers/omx/entrypoint.c 
b/src/gallium/state_trackers/omx/entrypoint.c
index 5afb58be3a3..fa2074ad1b7 100644
--- a/src/gallium/state_trackers/omx/entrypoint.c
+++ b/src/gallium/state_trackers/omx/entrypoint.c
@@ -35,7 +35,13 @@
 #include <string.h>
 #include <stdbool.h>
 
+#if defined(HAVE_X11_PLATFORM)
 #include <X11/Xlib.h>
+#else
+#define XOpenDisplay(x) NULL
+#define XCloseDisplay(x)
+#define Display void
+#endif
 
 #include "os/os_thread.h"
 #include "util/u_memory.h"
-- 
2.12.2

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to