[tracker-miners/abderrahim/systemdunitdir-master] build: get the systemd user unit dir from pkg-config
- From: Abderrahim Kitouni <akitouni src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker-miners/abderrahim/systemdunitdir-master] build: get the systemd user unit dir from pkg-config
- Date: Sat, 21 Mar 2020 07:49:11 +0000 (UTC)
commit 5527dc3c66f2646ef06d88015d9d4ba8e735430b
Author: Abderrahim Kitouni <akitouni gnome org>
Date: Sat Mar 21 08:42:16 2020 +0100
build: get the systemd user unit dir from pkg-config
fixes #100
meson.build | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/meson.build b/meson.build
index dac9339c5..8b482a217 100644
--- a/meson.build
+++ b/meson.build
@@ -290,11 +290,10 @@ if get_option('systemd_user_services')
systemd_user_services_dir = get_option('systemd_user_services_dir')
if systemd_user_services_dir == ''
- systemd = dependency('systemd', required: false)
+ systemd = dependency('systemd', version: '>= 242', required: false)
if systemd.found()
- # FIXME: this would ideally use the systemduserunitdir pkgconfig variable, but
- # it does not depend on variables we can override to install within prefix.
- systemd_user_services_dir = join_paths(libdir, 'systemd', 'user')
+ systemd_user_services_dir = systemd.get_pkgconfig_variable('systemduserunitdir',
+ define_variable: ['prefix',
get_option('prefix')])
else
error('systemd user services were enabled, but systemd was not found. ' +
'Please set the systemd_user_services_dir option if you want to ' +
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]