meson: Make systemd optional

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

View file

@ -243,7 +243,7 @@ if alsa_dep.found()
cdata.set('HAVE_ALSA_UCM', 1)
endif
systemd_dep = dependency('libsystemd', required : false)
systemd_dep = dependency('libsystemd', required : get_option('systemd'))
if systemd_dep.found()
cdata.set('HAVE_SYSTEMD_DAEMON', 1)
cdata.set('HAVE_SYSTEMD_LOGIN', 1)

View file

@ -23,6 +23,9 @@ option('alsa',
option('dbus',
type : 'feature', value : 'auto',
description : 'Optional D-Bus support')
option('systemd',
type : 'feature', value : 'auto',
description : 'Optional systemd support')
option('x11',
type : 'feature', value : 'auto',
description : 'Optional X11 support')