meson: if media-session is to be built but alsa is missing, error out

If -Dsession-managers includes media-session, we should error out if the
dependency is missing instead of just silently skipping the build.
This commit is contained in:
Peter Hutterer 2021-09-07 15:36:32 +10:00 committed by Wim Taymans
parent f0bc0d068e
commit 902444ae1a

View file

@ -56,7 +56,10 @@ executable('export-spa-device',
dependencies : [pipewire_dep, mathlib],
)
if get_option('session-managers').contains('media-session') and alsa_dep.found()
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()