From b643f31976d92f67e9fab863836f74ccf41c75d5 Mon Sep 17 00:00:00 2001 From: Leo Date: Sat, 13 Mar 2021 02:52:44 -0300 Subject: [PATCH] build: don't install systemd service unless systemd is found avoids installing useless files when compiling on non-systemd systems like Alpine Linux and Void Linux --- service/meson.build | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/service/meson.build b/service/meson.build index a2045e5..214b74f 100644 --- a/service/meson.build +++ b/service/meson.build @@ -10,14 +10,16 @@ configure_file( install_dir: dbus_session_service_dir, ) -systemd_service = 'dconf.service' +if systemd_dep.found() + systemd_service = 'dconf.service' -configure_file( - input: systemd_service + '.in', - output: systemd_service, - configuration: service_conf, - install_dir: systemd_userunitdir, -) + configure_file( + input: systemd_service + '.in', + output: systemd_service, + configuration: service_conf, + install_dir: systemd_userunitdir, + ) +endif lib_sources = [ 'dconf-blame.c', -- GitLab