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 <arnaud.rebillout@collabora.com>
This commit is contained in:
Arnaud Rebillout 2018-10-09 11:41:07 +07:00 committed by Arun Raghavan
parent b709c8a14b
commit 6ff3420405
2 changed files with 6 additions and 15 deletions

View file

@ -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)

View file

@ -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