From 55cb38d0a828c95c694cc4f97dad440080af0643 Mon Sep 17 00:00:00 2001 From: Rasmus Thomsen Date: Sat, 19 May 2018 11:41:41 +0200 Subject: [PATCH] meson: add systemd option This is handy for source distributions, which want to avoid automagic dependencies --- meson_options.txt | 4 ++++ src/daemon/meson.build | 11 +++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/meson_options.txt b/meson_options.txt index 02b931943..8e7976865 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -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) diff --git a/src/daemon/meson.build b/src/daemon/meson.build index 27eb1f009..0761224d7 100644 --- a/src/daemon/meson.build +++ b/src/daemon/meson.build @@ -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