[tracker/abderrahim/systemdunitdir] build: get the systemd user unit dir from pkg-config



commit d3b32126f93b12aa858da146ae2b2e0ee0e91a90
Author: Abderrahim Kitouni <akitouni gnome org>
Date:   Fri Mar 20 17:37:48 2020 +0100

    build: get the systemd user unit dir from pkg-config

 meson.build | 7 +++----
 1 file 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)'


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]