From bd87902da6a2badae096e4679eedfe9da2e75d79 Mon Sep 17 00:00:00 2001 From: Mark Gallagher Date: Thu, 22 Dec 2022 15:45:06 +0000 Subject: [PATCH] Add a build option to specify whether pulse gsettings schema should be installed --- meson.build | 3 +++ meson_options.txt | 4 ++++ src/modules/meson.build | 16 +++++++++------- 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/meson.build b/meson.build index 6e21a2fb9..90a599161 100644 --- a/meson.build +++ b/meson.build @@ -343,6 +343,9 @@ cdata.set('HAVE_GLIB2', flatpak_support) gio_dep = dependency('gio-2.0', version : '>= 2.26.0', required : get_option('gsettings')) summary({'GIO (GSettings)': gio_dep.found()}, bool_yn: true, section: 'Misc dependencies') +if not gio_dep.found() and get_option('gsettings-pulse-schema').enabled() + error('`gsettings-pulse-schema` is enabled but `gio` was not found.') +endif gst_option = get_option('gstreamer') gst_deps_def = { diff --git a/meson_options.txt b/meson_options.txt index a09b65859..5918dee2e 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -330,3 +330,7 @@ option('libffado', description: 'Enable code that depends on libffado', type: 'feature', value: 'auto') +option('gsettings-pulse-schema', + description: 'Install gsettings schema for pulseaudio', + type: 'feature', + value: 'auto') diff --git a/src/modules/meson.build b/src/modules/meson.build index 00a8ec057..85f309a8c 100644 --- a/src/modules/meson.build +++ b/src/modules/meson.build @@ -415,13 +415,15 @@ if gio_dep.found() ] pipewire_module_protocol_pulse_deps += gio_dep cdata.set('HAVE_GIO', true) - install_data(['module-protocol-pulse/modules/org.freedesktop.pulseaudio.gschema.xml'], - install_dir: pipewire_datadir / 'glib-2.0' / 'schemas' - ) - gnome = import('gnome') - gnome.post_install( - glib_compile_schemas: true - ) + if get_option('gsettings-pulse-schema').enabled() + install_data(['module-protocol-pulse/modules/org.freedesktop.pulseaudio.gschema.xml'], + install_dir: pipewire_datadir / 'glib-2.0' / 'schemas' + ) + gnome = import('gnome') + gnome.post_install( + glib_compile_schemas: true + ) + endif endif if flatpak_support