From 6ff34204057431dc8e4818c0a0f6aea46085b582 Mon Sep 17 00:00:00 2001 From: Arnaud Rebillout Date: Tue, 9 Oct 2018 11:41:07 +0700 Subject: [PATCH] meson: Tighter coupling of XOrg dependencies If `x11-xcb` is found, then let's force other X11 dependencies to be there as well. That makes things a bit easier, and that's also what is done in the autotools build system. Signed-off-by: Arnaud Rebillout --- meson.build | 9 ++++----- src/modules/meson.build | 12 ++---------- 2 files changed, 6 insertions(+), 15 deletions(-) diff --git a/meson.build b/meson.build index a0822f369..5c985c00a 100644 --- a/meson.build +++ b/meson.build @@ -230,6 +230,10 @@ endif x11_dep = dependency('x11-xcb', required : false) if x11_dep.found() + xcb_dep = dependency('xcb', required : true, version : '>= 1.6') + ice_dep = dependency('ice', required : true) + sm_dep = dependency('sm', required : true) + xtst_dep = dependency('xtst', required : true) cdata.set('HAVE_X11', 1) endif @@ -256,11 +260,6 @@ if cc.has_header('sys/soundcard.h') cdata.set_quoted('PULSEDSP_LOCATION', pulsedspdir) endif -# X11 deps, we don't define any HAVE_XXX for these one -ice_dep = dependency('ice', required : false) -sm_dep = dependency('sm', required: false) -xtst_dep = dependency('xtst', required: false) - avahi_dep = dependency('avahi-client', version : '>= 0.6.0', required : false) if avahi_dep.found() cdata.set('HAVE_AVAHI', 1) diff --git a/src/modules/meson.build b/src/modules/meson.build index b951e2374..89ca50987 100644 --- a/src/modules/meson.build +++ b/src/modules/meson.build @@ -182,18 +182,10 @@ endif if x11_dep.found() all_modules += [ [ 'module-x11-bell', 'x11/module-x11-bell.c', [], [], [x11_dep] ], + [ 'module-x11-cork-request', 'x11/module-x11-cork-request.c', [], [], [x11_dep, xtst_dep] ], [ 'module-x11-publish', 'x11/module-x11-publish.c', [], [], [x11_dep], libprotocol_native ], + [ 'module-x11-xsmp', 'x11/module-x11-xsmp.c', [], [], [x11_dep, ice_dep, sm_dep] ], ] - if xtst_dep.found() - all_modules += [ - [ 'module-x11-cork-request', 'x11/module-x11-cork-request.c', [], [], [x11_dep, xtst_dep] ], - ] - endif - if ice_dep.found() and sm_dep.found() - all_modules += [ - [ 'module-x11-xsmp', 'x11/module-x11-xsmp.c', [], [], [x11_dep, ice_dep, sm_dep] ], - ] - endif endif # Module echo-cancel is quite modular itself and requires a section of its own