2022-05-29 14:09:06 +02:00
|
|
|
allocators = get_option('allocators')
|
|
|
|
if 'auto' in allocators and get_option('auto_features').enabled()
|
|
|
|
allocators = ['gbm']
|
2022-06-29 11:32:06 +02:00
|
|
|
elif 'auto' in allocators and get_option('auto_features').disabled()
|
2022-05-29 14:09:06 +02:00
|
|
|
allocators = []
|
|
|
|
endif
|
|
|
|
|
2021-08-25 09:33:19 +02:00
|
|
|
wlr_files += files(
|
|
|
|
'allocator.c',
|
|
|
|
'shm.c',
|
|
|
|
'drm_dumb.c',
|
|
|
|
)
|
|
|
|
|
2022-05-29 14:09:06 +02:00
|
|
|
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])
|
2022-11-25 18:15:31 +01:00
|
|
|
internal_config.set10('HAVE_GBM_BO_GET_FD_FOR_PLANE', has)
|
2022-05-29 14:09:06 +02:00
|
|
|
endif
|