summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorBenjamin Berg <bberg@redhat.com>2019-12-11 17:33:41 +0100
committerBenjamin Berg <benjamin@sipsolutions.net>2020-07-31 08:54:40 +0000
commitb1f9ea623c6c88f00086286dd4898b727d134223 (patch)
treeb241949552bb2aa1926cb20980bb69f26271e24f /meson.build
parent069863225cc06be01ab0c089a12aae75e0d0497e (diff)
downloadgnome-session-b1f9ea623c6c88f00086286dd4898b727d134223.tar.gz
meson: Use systemduserunitdir variable from systemd.pc
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build5
1 files changed, 5 insertions, 0 deletions
diff --git a/meson.build b/meson.build
index bd98b9ff..393c0cf2 100644
--- a/meson.build
+++ b/meson.build
@@ -6,6 +6,7 @@ project(
meson_version: '>= 0.43.0'
)
+prefix = get_option('prefix')
session_version = meson.project_version()
version_array = session_version.split('.')
session_major_version = version_array[0].to_int()
@@ -129,6 +130,10 @@ if enable_systemd or enable_consolekit
# Check for systemd
if enable_systemd
+ systemd_dep = dependency('systemd', version: '>= 242', required: true)
+ systemd_userunitdir = systemd_dep.get_pkgconfig_variable('systemduserunitdir',
+ define_variable: ['prefix', prefix])
+
libsystemd_dep = dependency('libsystemd', version: '>= 209', required: false)
session_bin_deps += libsystemd_dep