From 099350a414dc88b0ee7b9631e03591765814a4bf Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Thu, 9 May 2024 12:02:50 +0200 Subject: [PATCH] build: check eglext.h header version We use EGL_EXT_device_drm_render_node, which has been introduced here: https://github.com/KhronosGroup/EGL-Registry/commit/53f038f6fd43e25d8d20f2688f5500b3079e9f25 --- render/meson.build | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/render/meson.build b/render/meson.build index 8c71ff07..7c125407 100644 --- a/render/meson.build +++ b/render/meson.build @@ -27,6 +27,20 @@ internal_config.set10('HAVE_EVENTFD', cc.has_header('sys/eventfd.h')) if 'gles2' in renderers or 'auto' in renderers egl = dependency('egl', required: 'gles2' in renderers) + if egl.found() + eglext_version = cc.get_define( + 'EGL_EGLEXT_VERSION', + dependencies: egl, + prefix: '#include ', + ).to_int() + if eglext_version < 20210604 + egl = dependency( + '', + required: 'gles2' in renderers, + not_found_message: 'EGL headers too old', + ) + endif + endif gbm = dependency('gbm', required: 'gles2' in renderers) if egl.found() and gbm.found() wlr_deps += [egl, gbm]