meson: Make alsa optional

Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
This commit is contained in:
Arnaud Rebillout 2018-10-19 16:37:05 +07:00 committed by Arun Raghavan
parent 14722a907b
commit 54900beb59
2 changed files with 4 additions and 1 deletions

View File

@ -237,7 +237,7 @@ if x11_dep.found()
cdata.set('HAVE_X11', 1)
endif
alsa_dep = dependency('alsa', version : '>= 1.0.24', required : false)
alsa_dep = dependency('alsa', version : '>= 1.0.24', required : get_option('alsa'))
if alsa_dep.found()
cdata.set('HAVE_ALSA_UCM', 1)
endif

View File

@ -17,6 +17,9 @@ option('pulsedspdir',
# Optional features
option('alsa',
type : 'feature', value : 'auto',
description : 'Optional ALSA support')
option('dbus',
type : 'feature', value : 'auto',
description : 'Optional D-Bus support')