aboutsummaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2022-05-11 18:58:07 +0000
committerDaniel Eklöf <daniel@ekloef.se>2022-05-12 11:46:06 +0000
commit15d45d5704f3cf4a6fc31fb6204cb5d874aa2bae (patch)
tree6cbacae9bf1e6a201386a7e240037773181be350 /meson.build
parentmeson: add -Dsystemd-units-dir=<path> meson command line option (diff)
meson: -Dsystemd-units-dir installs even if systemd is not found
If -Dsystemd-units-dir is explicitly set, then install the systemd service files regardless of whether systemd is available or not.
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build8
1 files changed, 4 insertions, 4 deletions
diff --git a/meson.build b/meson.build
index e6f4f530..6b50ba03 100644
--- a/meson.build
+++ b/meson.build
@@ -247,16 +247,16 @@ install_data(
install_dir: join_paths(get_option('datadir'), 'applications'))
systemd = dependency('systemd', required: false)
-if systemd.found()
+custom_systemd_units_dir = get_option('systemd-units-dir')
+if systemd.found() or custom_systemd_units_dir != ''
configuration = configuration_data()
configuration.set('bindir', join_paths(get_option('prefix'), get_option('bindir')))
- custom_units_dir = get_option('systemd-units-dir')
- if (custom_units_dir == '')
+ if (custom_systemd_units_dir == '')
systemd_units_dir = systemd.get_variable('systemduserunitdir')
else
- systemd_units_dir = custom_units_dir
+ systemd_units_dir = custom_systemd_units_dir
endif
configure_file(