From 15d45d5704f3cf4a6fc31fb6204cb5d874aa2bae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Wed, 11 May 2022 20:58:07 +0200 Subject: [PATCH] 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. --- meson.build | 8 ++++---- 1 file 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(