meson: Make avahi optional

Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
This commit is contained in:
Arnaud Rebillout 2018-10-19 17:04:01 +07:00 committed by Arun Raghavan
parent 9a0060d208
commit d984da3fea
2 changed files with 4 additions and 1 deletions

View file

@ -261,7 +261,7 @@ if cc.has_header('sys/soundcard.h')
cdata.set_quoted('PULSEDSP_LOCATION', pulsedspdir)
endif
avahi_dep = dependency('avahi-client', version : '>= 0.6.0', required : false)
avahi_dep = dependency('avahi-client', version : '>= 0.6.0', required : get_option('avahi'))
if avahi_dep.found()
cdata.set('HAVE_AVAHI', 1)
endif

View file

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