summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAbderrahim Kitouni <akitouni@gnome.org>2020-03-20 17:37:48 +0100
committerAbderrahim Kitouni <akitouni@gnome.org>2020-03-20 18:34:20 +0100
commitd3b32126f93b12aa858da146ae2b2e0ee0e91a90 (patch)
tree19ee91b34fa545998430e6d29e773b14f62a4493
parent4c9be42b1fda9b801f2c6d9be1ad7645779f26fb (diff)
downloadtracker-d3b32126f93b12aa858da146ae2b2e0ee0e91a90.tar.gz
build: get the systemd user unit dir from pkg-config
-rw-r--r--meson.build7
1 files changed, 3 insertions, 4 deletions
diff --git a/meson.build b/meson.build
index 26adf3017..b580a1ea9 100644
--- a/meson.build
+++ b/meson.build
@@ -198,12 +198,11 @@ endif
install_systemd_user_services = false
if get_option('systemd_user_services') == 'yes' or get_option('systemd_user_services') == 'auto'
- 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.
install_systemd_user_services = true
- 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
install_systemd_user_services = false
systemd_user_services_dir = '(not found)'