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
1 changed files with 5 additions and 6 deletions

View File

@ -14,13 +14,12 @@ wlr_files += files(
'wlr_texture.c',
)
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
if 'gles2' in renderers or 'auto' in renderers
subdir('gles2')
endif