render: completely disable gles2 if requested but libEGL is found

For `required` to disable search the value needs to be of `feature` type.
Checking `gles2` via `in` keyword returns a `bool` but `required: false`
makes the dependency optional instead of disabled.
This commit is contained in:
Jan Beich 2021-10-05 01:49:27 +00:00 committed by Simon Ser
parent 8bc1086cac
commit 760e166578

View file

@ -14,13 +14,12 @@ wlr_files += files(
'wlr_texture.c', 'wlr_texture.c',
) )
egl = dependency('egl', required: 'gles2' in renderers)
if egl.found()
wlr_deps += egl
wlr_files += files('egl.c')
endif
if 'gles2' in renderers or 'auto' in renderers if 'gles2' in renderers or 'auto' in renderers
egl = dependency('egl', required: 'gles2' in renderers)
if egl.found()
wlr_deps += egl
wlr_files += files('egl.c')
endif
subdir('gles2') subdir('gles2')
endif endif