wlroots/render/allocator/meson.build
Simon Ser b992930ebe render/allocator/gbm: use gbm_bo_create_with_modifiers2() if available
The flags are not really used now but will be exposed soon.
2023-11-30 20:22:41 +01:00

28 lines
812 B
Meson

allocators = get_option('allocators')
if 'auto' in allocators and get_option('auto_features').enabled()
allocators = ['gbm']
elif 'auto' in allocators and get_option('auto_features').disabled()
allocators = []
endif
wlr_files += files(
'allocator.c',
'shm.c',
'drm_dumb.c',
)
gbm = disabler()
if 'gbm' in allocators or 'auto' in allocators
gbm = dependency('gbm', version: '>=17.1.0', required: 'gbm' in allocators)
endif
if gbm.found()
wlr_files += files('gbm.c')
wlr_deps += gbm
features += { 'gbm-allocator': true }
has = cc.has_function('gbm_bo_get_fd_for_plane', dependencies: [gbm])
internal_config.set10('HAVE_GBM_BO_GET_FD_FOR_PLANE', has)
has = cc.has_function('gbm_bo_create_with_modifiers2', dependencies: [gbm])
internal_config.set10('HAVE_GBM_BO_CREATE_WITH_MODIFIERS2', has)
endif