wlroots/render/meson.build
Simon Ser bb2946f737 build: make GBM optional
Now that the DRM backend no longer depends on GBM, we can make it
optional. The GLES2 renderer still depends on it because of our EGL
device selection.

This is useful for compositors with their own renderers, and for
compositors using the Vulkan renderer.
2022-05-30 13:30:08 +00:00

34 lines
744 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)
gbm = dependency('gbm', required: 'gles2' in renderers)
if egl.found() and gbm.found()
wlr_deps += [egl, gbm]
wlr_files += files('egl.c')
endif
subdir('gles2')
endif
if 'vulkan' in renderers or 'auto' in renderers
subdir('vulkan')
endif
subdir('pixman')
subdir('allocator')