meson: fix conflicting use of feature-based dependency lookups

When spa-plugins is enabled, the gio-2.0 global dependency is
overwritten.

When bluez support is enabled, OR when gsettings is enabled, the gio-2.0
dependency is then detected as found. This means that
pipewire-module-protocol-pulse can end up enabling gsettings support
even if it has been forcibly turned off.

Rename the meson variables to ensure they are looked up separately.
This commit is contained in:
Eli Schwartz 2024-06-30 13:44:06 -04:00 committed by Wim Taymans
parent 2770e96e08
commit b5f031bc15
3 changed files with 8 additions and 8 deletions

View file

@ -346,9 +346,9 @@ summary({'GLib-2.0 (Flatpak support)': glib2_dep.found()}, bool_yn: true, sectio
flatpak_support = glib2_dep.found()
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()
gsettings_gio_dep = dependency('gio-2.0', version : '>= 2.26.0', required : get_option('gsettings'))
summary({'GIO (GSettings)': gsettings_gio_dep.found()}, bool_yn: true, section: 'Misc dependencies')
if not gsettings_gio_dep.found() and get_option('gsettings-pulse-schema').enabled()
error('`gsettings-pulse-schema` is enabled but `gio` was not found.')
endif