diff options
author | Dudemanguy <random342@airmail.cc> | 2020-12-08 14:34:06 -0600 |
---|---|---|
committer | Benjamin Berg <bberg@redhat.com> | 2020-12-11 15:01:24 +0100 |
commit | 5aa61adabc604d27332d5af0e4cba1e815fd8ef2 (patch) | |
tree | 014025ba60ca126044e0e58be3fa2960489040bc /meson.build | |
parent | 1fc10f15eeac5a7e2efbf01dc4a8b0ca6ec0e8e0 (diff) |
build: make systemd dependency optional
The systemd dependency is only used to install some systemd service
files. This can easily be made optional.
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/meson.build b/meson.build index 66aa2f7..858f1fc 100644 --- a/meson.build +++ b/meson.build @@ -94,13 +94,17 @@ pod2man = find_program('pod2man', required: get_option('man')) xsltproc = find_program('xsltproc', required: get_option('gtk_doc')) # StateDirectory was introduced in systemd 235 -systemd_dep = dependency('systemd', version: '>= 235') +systemd_dep = dependency('systemd', version: '>= 235', required: false) systemd_unit_dir = get_option('systemd_system_unit_dir') -if systemd_unit_dir == '' +if systemd_unit_dir == '' and systemd_dep.found() systemd_unit_dir = systemd_dep.get_pkgconfig_variable('systemdsystemunitdir') endif +if get_option('systemd') and systemd_unit_dir == '' + error('systemd development files or systemd_system_unit_dir is needed for systemd support.') +endif + dbus_service_dir = get_option('dbus_service_dir') dbus_data_dir = datadir dbus_interfaces_dir = '' |