From 3c5e6c536f274fc51aeafb3f4b27b395f9ef43e1 Mon Sep 17 00:00:00 2001 From: Marius Vlad Date: Wed, 15 Dec 2021 00:39:59 +0200 Subject: [PATCH] clients/meson:build: Conditionally build dmabuf-feedback client As mesa includes gbm_bo_get_fd_for_plane() from 21.1.0 version onwards, build the dma-buf feedback client only after that. This should provide some sanity for package maintainers, as this would need pulling a rather newer mesa version to build it (which might not be available). Signed-off-by: Marius Vlad --- clients/meson.build | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/clients/meson.build b/clients/meson.build index 50caf7b3..362f7fe3 100644 --- a/clients/meson.build +++ b/clients/meson.build @@ -36,6 +36,9 @@ dep_toytoolkit = declare_dependency( dependencies: deps_toytoolkit, ) +simple_clients_enabled = get_option('simple-clients') +simple_build_all = simple_clients_enabled.contains('all') + simple_clients = [ { 'name': 'damage', @@ -66,6 +69,11 @@ simple_clients = [ dep_pixman, dep_libdrm, dependency('libudev', version: '>= 136'), + # gbm_bo_get_fd_for_plane() from 21.1.0 + dependency('gbm', version: '>= 21.1.1', + required: simple_build_all or simple_clients_enabled.contains('dmabuf-feedback'), + not_found_message: 'dmabuf-feedback requires gbm which was not found. If you rather not build this, drop "dmabuf-feedback" from simple-clients option.', + disabler: true) ], 'deps': [ 'egl', 'glesv2', 'gbm' ], 'options': [ 'renderer-gl' ] @@ -146,8 +154,6 @@ simple_clients = [ }, ] -simple_clients_enabled = get_option('simple-clients') -simple_build_all = simple_clients_enabled.contains('all') foreach t : simple_clients if simple_build_all or simple_clients_enabled.contains(t.get('name')) t_name = 'weston-simple-' + t.get('name')