summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorNiels De Graef <nielsdegraef@gmail.com>2022-06-12 23:23:49 +0200
committerNiels De Graef <nielsdegraef@gmail.com>2022-06-13 16:57:04 +0200
commitc16f69a98d3cfa52eae7f650cd2adfe95f5dea87 (patch)
tree1fcd158f09fbaaeee1a2b660b7526357d1e7cf6f /meson.build
parent9b1e76f70ea4d27e9d0b2b27dd4d24f200aa1e80 (diff)
downloadgcr-c16f69a98d3cfa52eae7f650cd2adfe95f5dea87.tar.gz
meson: Install DBus services in the correct prefix
We should use the pkg-config variable of the `dbus-1` package to check where we should install our D-Bus services, but we also need to make sure we don't pollute anything outside of $prefix, so make sure to get that case as well.
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build9
1 files changed, 9 insertions, 0 deletions
diff --git a/meson.build b/meson.build
index c3d9ba3..a1e0882 100644
--- a/meson.build
+++ b/meson.build
@@ -73,6 +73,15 @@ if libsystemd.found() and systemd.found()
with_systemd = true
endif
+dbus_dep = dependency('dbus-1', required: false)
+if dbus_dep.found()
+ dbus_services_dir = dbus_dep.get_variable('session_bus_services_dir',
+ pkgconfig_define: [ 'datadir', get_option('datadir') ],
+ )
+else
+ dbus_services_dir = get_option('datadir') / 'dbus-1' / 'services'
+endif
+
if get_option('gtk3')
gtk3_min_version = '3.22'
gtk3_dep = dependency('gtk+-3.0', version: '>=' + gtk3_min_version)