Commit 08e19e0e authored by Benjamin Berg's avatar Benjamin Berg

meson: Use systemduserunitdir variable from systemd.pc

parent ae3ffc3c
......@@ -92,13 +92,6 @@ if enable_systemd_session
unit_conf = configuration_data()
unit_conf.set('libexecdir', session_libexecdir)
# XXX: Once https://github.com/systemd/systemd/issues/9595 is fixed and we can
# depend on this version, replace with something like:
# dep_systemd = dependency('systemd', required: true)
# systemd_userunitdir = dep_systemd.get_pkgconfig_variable('systemduserunitdir')
# and uncomment systemd_dep below
systemd_userunitdir = join_paths(session_prefix, 'lib', 'systemd', 'user')
systemd_service = ['gnome-session-manager@.service',
'gnome-session-signal-init.service',
'gnome-session-restart-dbus.service',
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment