meson: add systemd option

This is handy for source distributions, which want to avoid
automagic dependencies
This commit is contained in:
Rasmus Thomsen 2018-05-19 11:41:41 +02:00 committed by Wim Taymans
parent 58c977f69e
commit 55cb38d0a8
2 changed files with 11 additions and 4 deletions

View file

@ -10,3 +10,7 @@ option('enable_gstreamer',
description: 'Build GStreamer plugins',
type: 'boolean',
value: false)
option('systemd',
description: 'Enable systemd integration',
type: 'boolean',
value: true)

View file

@ -30,8 +30,11 @@ executable('pipewire',
dependencies : [pipewire_dep],
)
systemd = dependency('systemd', required: false)
if systemd.found()
subdir('systemd')
if get_option('systemd')
systemd = dependency('systemd', required: false)
if systemd.found()
subdir('systemd')
else
warning('Systemd integration was enabled, but systemd is not available')
endif
endif