mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2024-11-29 10:32:29 +00:00
6d07193bda
It's cumbersome for compositors to guard every wlr_color_transform_ref() or wlr_color_transform_unref() call behind a #if WLR_HAS_COLOR_MANAGEMENT. Moreover, none of the LCMS2 types are used in our public API. Instead, always install the color.h header, and add a stub for wlr_color_transform_init_linear_to_icc().
52 lines
1.2 KiB
Meson
52 lines
1.2 KiB
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(
|
|
'color.c',
|
|
'dmabuf.c',
|
|
'drm_format_set.c',
|
|
'pass.c',
|
|
'pixel_format.c',
|
|
'swapchain.c',
|
|
'wlr_renderer.c',
|
|
'wlr_texture.c',
|
|
)
|
|
|
|
if cc.has_header('linux/dma-buf.h') and target_machine.system() == 'linux'
|
|
wlr_files += files('dmabuf_linux.c')
|
|
else
|
|
wlr_files += files('dmabuf_fallback.c')
|
|
endif
|
|
|
|
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')
|
|
internal_features += { 'egl': true }
|
|
endif
|
|
subdir('gles2')
|
|
endif
|
|
|
|
if 'vulkan' in renderers or 'auto' in renderers
|
|
subdir('vulkan')
|
|
endif
|
|
|
|
subdir('pixman')
|
|
|
|
subdir('allocator')
|
|
|
|
lcms2 = dependency('lcms2', required: get_option('color-management'))
|
|
if lcms2.found()
|
|
wlr_deps += lcms2
|
|
wlr_files += files('color_lcms2.c')
|
|
features += { 'color-management': true }
|
|
else
|
|
wlr_files += files('color_fallback.c')
|
|
endif
|