2021-04-09 02:48:01 +00:00
|
|
|
renderers = get_option('renderers')
|
|
|
|
if 'auto' in renderers and get_option('auto_features').enabled()
|
2021-02-21 17:30:12 +00:00
|
|
|
renderers = ['gles2', 'vulkan']
|
2021-04-09 02:48:01 +00:00
|
|
|
elif 'auto' in renderers and get_option('auto_features').disabled()
|
|
|
|
renderers = []
|
|
|
|
endif
|
|
|
|
|
2019-11-22 07:11:15 +00:00
|
|
|
wlr_files += files(
|
2024-04-30 14:52:10 +00:00
|
|
|
'color.c',
|
2019-11-22 07:11:15 +00:00
|
|
|
'dmabuf.c',
|
|
|
|
'drm_format_set.c',
|
2021-10-20 16:47:46 +00:00
|
|
|
'drm_syncobj.c',
|
2022-06-21 20:39:29 +00:00
|
|
|
'pass.c',
|
2021-03-15 16:29:29 +00:00
|
|
|
'pixel_format.c',
|
2020-06-01 17:49:32 +00:00
|
|
|
'swapchain.c',
|
2019-11-22 07:11:15 +00:00
|
|
|
'wlr_renderer.c',
|
|
|
|
'wlr_texture.c',
|
2017-10-08 00:19:25 +00:00
|
|
|
)
|
2021-01-15 21:12:02 +00:00
|
|
|
|
2022-05-26 12:44:02 +00:00
|
|
|
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
|
|
|
|
|
2023-07-10 15:24:09 +00:00
|
|
|
internal_config.set10('HAVE_EVENTFD', cc.has_header('sys/eventfd.h'))
|
|
|
|
|
2021-04-09 02:48:01 +00:00
|
|
|
if 'gles2' in renderers or 'auto' in renderers
|
2021-10-05 01:49:27 +00:00
|
|
|
egl = dependency('egl', required: 'gles2' in renderers)
|
2024-05-09 10:02:50 +00:00
|
|
|
if egl.found()
|
|
|
|
eglext_version = cc.get_define(
|
|
|
|
'EGL_EGLEXT_VERSION',
|
|
|
|
dependencies: egl,
|
|
|
|
prefix: '#include <EGL/eglext.h>',
|
|
|
|
).to_int()
|
|
|
|
if eglext_version < 20210604
|
|
|
|
egl = dependency(
|
|
|
|
'',
|
|
|
|
required: 'gles2' in renderers,
|
|
|
|
not_found_message: 'EGL headers too old',
|
|
|
|
)
|
|
|
|
endif
|
|
|
|
endif
|
2022-05-29 12:09:06 +00:00
|
|
|
gbm = dependency('gbm', required: 'gles2' in renderers)
|
|
|
|
if egl.found() and gbm.found()
|
|
|
|
wlr_deps += [egl, gbm]
|
2021-10-05 01:49:27 +00:00
|
|
|
wlr_files += files('egl.c')
|
2022-06-24 05:20:42 +00:00
|
|
|
internal_features += { 'egl': true }
|
2021-10-05 01:49:27 +00:00
|
|
|
endif
|
2021-04-09 02:48:01 +00:00
|
|
|
subdir('gles2')
|
|
|
|
endif
|
|
|
|
|
2021-02-21 17:30:12 +00:00
|
|
|
if 'vulkan' in renderers or 'auto' in renderers
|
|
|
|
subdir('vulkan')
|
|
|
|
endif
|
|
|
|
|
2021-01-18 04:15:36 +00:00
|
|
|
subdir('pixman')
|
2021-08-25 07:33:19 +00:00
|
|
|
|
|
|
|
subdir('allocator')
|
2023-09-10 00:04:45 +00:00
|
|
|
|
|
|
|
lcms2 = dependency('lcms2', required: get_option('color-management'))
|
|
|
|
if lcms2.found()
|
|
|
|
wlr_deps += lcms2
|
2024-04-30 14:52:10 +00:00
|
|
|
wlr_files += files('color_lcms2.c')
|
2023-09-10 00:04:45 +00:00
|
|
|
features += { 'color-management': true }
|
2024-05-24 08:10:56 +00:00
|
|
|
else
|
|
|
|
wlr_files += files('color_fallback.c')
|
2023-09-10 00:04:45 +00:00
|
|
|
endif
|