summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorDaniel Playfair Cal <daniel.playfair.cal@gmail.com>2021-02-07 23:12:29 +0000
committerDaniel Playfair Cal <daniel.playfair.cal@gmail.com>2021-02-07 23:12:29 +0000
commitf603043e4afeefa461bc2b14cef3b5c132a44ecd (patch)
treed77a7709cfddb6cd6b3027e3f8620c1923247b6c /meson.build
parent9f31030aaddb301ff94c6a0e4532e2f14e3b9798 (diff)
parent2781a8684855e4120c9948d8b40880bafafe1b12 (diff)
downloaddconf-f603043e4afeefa461bc2b14cef3b5c132a44ecd.tar.gz
Merge branch 'wip/smcv/systemd-unit' into 'master'
service: Add a systemd unit for D-Bus activation Closes #24 See merge request GNOME/dconf!63
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build14
1 files changed, 14 insertions, 0 deletions
diff --git a/meson.build b/meson.build
index 41fe1a9..6e88015 100644
--- a/meson.build
+++ b/meson.build
@@ -48,6 +48,20 @@ glib_dep = dependency('glib-2.0', version: '>= 2.44.0')
gio_module_dir = gio_dep.get_pkgconfig_variable('giomoduledir', define_variable: ['libdir', dconf_libdir])
dbus_session_service_dir = dependency('dbus-1').get_pkgconfig_variable('session_bus_services_dir', define_variable: ['datadir', dconf_datadir])
+systemd_userunitdir = get_option('systemduserunitdir')
+
+if systemd_userunitdir == ''
+ systemd_dep = dependency('systemd', required: false)
+
+ if systemd_dep.found()
+ systemd_userunitdir = systemd_dep.get_pkgconfig_variable('systemduserunitdir')
+ else
+ # Fall back to the upstream default.
+ # Note that this is always 'lib', even if libdir is something else
+ systemd_userunitdir = join_paths(dconf_prefix, 'lib', 'systemd', 'user')
+ endif
+endif
+
enable_bash_completion = get_option('bash_completion')
if enable_bash_completion
bash_completion_dep = dependency('bash-completion')