summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcr/meson.build2
-rw-r--r--meson.build9
2 files changed, 10 insertions, 1 deletions
diff --git a/gcr/meson.build b/gcr/meson.build
index 745dade..88428ee 100644
--- a/gcr/meson.build
+++ b/gcr/meson.build
@@ -311,7 +311,7 @@ foreach service_file : gcr_service_files
configuration: {
'libexecdir': gcr_prefix / get_option('libexecdir'),
},
- install_dir: get_option('datadir') / 'dbus-1' / 'services',
+ install_dir: dbus_services_dir,
)
endforeach
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)