From 9acee530e2b6b52262ef45b154a0c6fcae487da2 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 26 Oct 2021 12:46:05 +1000 Subject: [PATCH] meson: switch to "foo in array" style for meson arrays In Meson, string.contains() is a substring check but array.contains() is a full string check. Let's use 'foo in bar' style instead to avoid confusion. Supported since meson 0.49.0 --- meson.build | 2 +- src/daemon/meson.build | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/meson.build b/meson.build index 7172ee4f5..0bcadf7b8 100644 --- a/meson.build +++ b/meson.build @@ -422,7 +422,7 @@ if not libintl_dep.found() endif summary({'intl support': libintl_dep.found()}, bool_yn: true) -need_alsa = get_option('pipewire-alsa').enabled() or get_option('session-managers').contains('media-session') +need_alsa = get_option('pipewire-alsa').enabled() or 'media-session' in get_option('session-managers') alsa_dep = dependency('alsa', version : '>=1.1.7', required: need_alsa) summary({'pipewire-alsa': alsa_dep.found()}, bool_yn: true) diff --git a/src/daemon/meson.build b/src/daemon/meson.build index 4d01f9c16..7f16d1efb 100644 --- a/src/daemon/meson.build +++ b/src/daemon/meson.build @@ -23,8 +23,8 @@ conf_config_uninstalled.set('pipewire_pulse_path', meson.build_root() / 'src' / 'daemon' / 'pipewire-pulse') conf_config_uninstalled.set('pulse_comment', '') -build_ms = get_option('session-managers').contains('media-session') -build_wp = get_option('session-managers').contains('wireplumber') +build_ms = 'media-session' in get_option('session-managers') +build_wp = 'wireplumber' in get_option('session-managers') default_sm = get_option('session-managers').get(0, '') summary({'Build media-session': build_ms,