summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorGert Wollny <gert.wollny@collabora.com>2021-09-20 16:19:50 +0200
committerGert Wollny <gert.wollny@collabora.com>2021-09-27 11:01:51 +0200
commit3b393c1171216136e1f308206aa0506ea43d0561 (patch)
tree221233701c284e1d9918d567a4222405525d84d4 /meson.build
parente19259f02d7bf3411acf317cda9a5a13868238e1 (diff)
meson: fail when EGL is requested, but EGL is not available
Closes: #243 Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build7
1 files changed, 6 insertions, 1 deletions
diff --git a/meson.build b/meson.build
index 7ae71da..d1ca4e4 100644
--- a/meson.build
+++ b/meson.build
@@ -184,7 +184,12 @@ if with_egl
if cc.has_header('epoxy/egl.h', dependencies: epoxy_dep) and epoxy_dep.get_pkgconfig_variable('epoxy_has_egl') == '1'
gbm_dep = dependency('gbm', version: '>= ' + _gbm_ver, required: require_egl)
have_egl = gbm_dep.found()
- conf_data.set('HAVE_EPOXY_EGL_H', 1)
+ if (have_egl)
+ conf_data.set('HAVE_EPOXY_EGL_H', 1)
+ else
+ assert(not require_egl,
+ 'egl was explicitely requested which requires gbm, and this is not available')
+ endif
else
assert(not require_egl,
'egl was explicitely requested but it is not supported by epoxy')