From 6ee4f86fa40b326794743c28c4843eed0b97e4b6 Mon Sep 17 00:00:00 2001 From: Arnaud Rebillout Date: Thu, 20 Sep 2018 18:35:53 +0700 Subject: [PATCH] meson: Enable x11 modules, add x11 related dependencies Signed-off-by: Arnaud Rebillout --- meson.build | 5 +++++ src/modules/meson.build | 21 +++++++++++++++++---- src/pulsecore/meson.build | 5 +++++ 3 files changed, 27 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index c3fe189..f948b25 100644 --- a/meson.build +++ b/meson.build @@ -228,6 +228,11 @@ cdata.set('DISABLE_ORC', 1) # Module dependencies +# 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 14f7f80..1bfbb68 100644 --- a/src/modules/meson.build +++ b/src/modules/meson.build @@ -80,10 +80,6 @@ all_modules = [ [ 'module-virtual-surround-sink', 'module-virtual-surround-sink.c' ], [ 'module-volume-restore', 'module-volume-restore.c' ], # [ 'module-waveout', 'module-waveout.c' ], -# [ 'module-x11-bell', 'x11/module-x11-bell.c' ], -# [ 'module-x11-cork-request', 'x11/module-x11-cork-request.c' ], -# [ 'module-x11-publish', 'x11/module-x11-publish.c' ], -# [ 'module-x11-xsmp', 'x11/module-x11-xsmp.c' ], # [ 'module-zeroconf-discover', 'module-zeroconf-discover.c' ], # [ 'module-zeroconf-publish', 'module-zeroconf-publish.c' ], ] @@ -138,6 +134,23 @@ if udev_dep.found() all_modules += [ [ 'module-udev-detect', 'module-udev-detect.c', [], [], [udev_dep] ] ] endif +if x11_dep.found() + all_modules += [ + [ 'module-x11-bell', 'x11/module-x11-bell.c', [], [], [x11_dep] ], + [ 'module-x11-publish', 'x11/module-x11-publish.c', [], [], [x11_dep], libprotocol_native ], + ] + 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 + foreach m : all_modules name = m[0] sources = m[1] diff --git a/src/pulsecore/meson.build b/src/pulsecore/meson.build index 60b9b9a..7057daf 100644 --- a/src/pulsecore/meson.build +++ b/src/pulsecore/meson.build @@ -126,6 +126,11 @@ if dbus_dep.found() ] endif +if x11_dep.found() + libpulsecore_sources += ['x11wrap.c'] + libpulsecore_headers += ['x11wrap.h'] +endif + # FIXME: walk through dependencies and add files # FIXME: SIMD support (ORC) -- 2.7.4