meson: require alsa for pipewire-alsa or media-session

The previous code had alsa optional if pipewire-alsa was on
auto/disabled bug failed later with missing alsa if media-session was in
the session manager array. Which it is by default.

Fixes #1632
This commit is contained in:
Peter Hutterer 2021-09-21 08:57:56 +10:00
parent 143f233be3
commit e8e7e72b76
2 changed files with 2 additions and 4 deletions

View file

@ -406,7 +406,8 @@ libinotify_dep = (build_machine.system() == 'freebsd'
# On FreeBSD, libintl library is required for gettext
libintl_dep = cc.find_library('intl', required: false)
alsa_dep = dependency('alsa', version : '>=1.1.7', required: get_option('pipewire-alsa'))
need_alsa = get_option('pipewire-alsa').enabled() or get_option('session-managers').contains('media-session')
alsa_dep = dependency('alsa', version : '>=1.1.7', required: need_alsa)
summary({'pipewire-alsa': alsa_dep.found()}, bool_yn: true)
installed_tests_metadir = pipewire_datadir / 'installed-tests' / pipewire_name

View file

@ -58,9 +58,6 @@ executable('export-spa-device',
media_session_sources = []
if get_option('session-managers').contains('media-session')
if not alsa_dep.found()
error('Required dependency alsa not found, cannot build media-session without it')
endif
sm_logind_src = []
sm_logind_dep = []
if systemd.found() and systemd_dep.found()