wlroots-hyprland/render/meson.build
Jan Beich 760e166578 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.
2021-11-02 09:36:38 +00:00

32 lines
664 B
Meson

renderers = get_option('renderers')
if 'auto' in renderers and get_option('auto_features').enabled()
renderers = ['gles2', 'vulkan']
elif 'auto' in renderers and get_option('auto_features').disabled()
renderers = []
endif
wlr_files += files(
'dmabuf.c',
'drm_format_set.c',
'pixel_format.c',
'swapchain.c',
'wlr_renderer.c',
'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
subdir('gles2')
endif
if 'vulkan' in renderers or 'auto' in renderers
subdir('vulkan')
endif
subdir('pixman')
subdir('allocator')