diff options
author | Daniel Playfair Cal <daniel.playfair.cal@gmail.com> | 2021-02-07 23:12:29 +0000 |
---|---|---|
committer | Daniel Playfair Cal <daniel.playfair.cal@gmail.com> | 2021-02-07 23:12:29 +0000 |
commit | f603043e4afeefa461bc2b14cef3b5c132a44ecd (patch) | |
tree | d77a7709cfddb6cd6b3027e3f8620c1923247b6c /meson.build | |
parent | 9f31030aaddb301ff94c6a0e4532e2f14e3b9798 (diff) | |
parent | 2781a8684855e4120c9948d8b40880bafafe1b12 (diff) | |
download | dconf-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.build | 14 |
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') |