aboutsummaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorJulien Olivain <juju@cotds.org>2020-05-11 08:58:30 +0200
committerGitHub <noreply@github.com>2020-05-11 08:58:30 +0200
commitc2288a7b88240e4377bfc1c67b44efb58f704a42 (patch)
treeafe501cf5ed4d0f028d250bac30bb7dffa188e49 /meson.build
parent1139234117f045e6e37ac585f8026b3c125d2ceb (diff)
render/egl: include EGL/eglmesaext.h only if present
This patch will make the EGL renderer work on any EGL/GLESv2 driver providing the EGL_WL_bind_wayland_display extensions. Mesa used to declare provisional EGL_WL_bind_wayland_display directly in <EGL/eglext.h>. Then, all unofficial extensions were moved to <EGL/eglmesaext.h>, to have a cleaner implementation. See: https://gitlab.freedesktop.org/mesa/mesa/-/commit/ab7bb10a2af711086319ce35815acd797b86fe27 The extension was then approved at Khronos Group, and reached the official <EGL/eglext.h>. See: https://www.khronos.org/registry/EGL/extensions/WL/EGL_WL_bind_wayland_display.txt https://github.com/KhronosGroup/EGL-Registry/commit/aa9b63f3ab18aee92c95786a2478156430f809e4 In order to make sure the renderer will work on any version of any implementation providing the extension, only include the mesa-specific header if it's present. Signed-off-by: Julien Olivain <juju@cotds.org>
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build5
1 files changed, 5 insertions, 0 deletions
diff --git a/meson.build b/meson.build
index 1a160208..a6dad5d6 100644
--- a/meson.build
+++ b/meson.build
@@ -86,6 +86,7 @@ conf_data.set10('WLR_HAS_X11_BACKEND', false)
conf_data.set10('WLR_HAS_XWAYLAND', false)
conf_data.set10('WLR_HAS_XCB_ERRORS', false)
conf_data.set10('WLR_HAS_XCB_ICCCM', false)
+conf_data.set10('WLR_HAS_EGLMESAEXT_H', false)
# Clang complains about some zeroed initializer lists (= {0}), even though they
# are valid
@@ -109,6 +110,10 @@ pixman = dependency('pixman-1')
math = cc.find_library('m')
rt = cc.find_library('rt')
+if cc.has_header('EGL/eglmesaext.h', dependencies: egl)
+ conf_data.set10('WLR_HAS_EGLMESAEXT_H', true)
+endif
+
wlr_files = []
wlr_deps = [
wayland_server,