[gnome-initial-setup/wjt/ci-fedora-31: 2/2] meson: Query systemd unit dir using pkg-config



commit fa546bed3a49cf1e176f5ffe6291a8ec017cfdc2
Author: Benjamin Berg <bberg redhat com>
Date:   Sat Dec 14 10:16:37 2019 +0100

    meson: Query systemd unit dir using pkg-config

 meson.build | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)
---
diff --git a/meson.build b/meson.build
index 2351b1e..fbacd90 100644
--- a/meson.build
+++ b/meson.build
@@ -33,14 +33,11 @@ conf.set_quoted('G_LOG_DOMAIN', 'InitialSetup')
 
 enable_systemd = get_option('systemd')
 if enable_systemd
-    systemd_dep = dependency('systemd', required: false)
+    systemd_dep = dependency('systemd', version: '>= 242', required: false)
     assert(systemd_dep.found(), 'Systemd support explicitly required, but systemd not found')
 
-    # XXX: Once https://github.com/systemd/systemd/issues/9595 is fixed and we can
-    # depend on this version, replace with something like:
-    #  systemduserunitdir = systemd_dep.get_pkgconfig_variable('systemduserunitdir')
-    # and uncomment systemd_dep below
-    systemd_userunitdir = join_paths(prefix, 'lib', 'systemd', 'user')
+    systemd_userunitdir = systemd_dep.get_pkgconfig_variable('systemduserunitdir',
+                                                             define_variable: ['prefix', prefix])
 endif
 
 # Needed for the 'account' page


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