summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorDaniel Wagner <dwagner@suse.de>2022-11-24 09:17:45 +0100
committerDaniel Wagner <dwagner@suse.de>2023-01-04 09:35:06 +0100
commitafb5bbaba40c5ba8d99c276ed42f2a043574f694 (patch)
treeeb485cd564ad4344427b17f8049714309236a438 /tools
parent6a774fbb79904b5b01aeefdc712c65de1019f170 (diff)
downloaddbus-afb5bbaba40c5ba8d99c276ed42f2a043574f694.tar.gz
meson: Introduce message_bus and tools command line option
To make the consume libdbus via Meson's subproject use case more useful, introduce message_bus and tools command line options which control if the D-Bus daemon and/or the tools are build. The idea here is that depending projects are interested only in the library. The strong recommendation is only to build libdbus as static library: libdbus_dep = dependency( 'dbus-1', required: get_option('libdbus'), fallback: ['dbus', 'libdbus_dep'], default_options: [ 'default_library=static', 'embedded_tests=false', 'message_bus=false', 'modular_tests=disabled', 'tools=false', ], ) This ensures that any installed D-Bus infrastructure on the target system is not overwritten. Signed-off-by: Daniel Wagner <dwagner@suse.de>
Diffstat (limited to 'tools')
-rw-r--r--tools/meson.build33
1 files changed, 18 insertions, 15 deletions
diff --git a/tools/meson.build b/tools/meson.build
index 4c3d9d22..5d78d93a 100644
--- a/tools/meson.build
+++ b/tools/meson.build
@@ -39,14 +39,15 @@ else
]
endif
-dbus_launch = executable('dbus-launch',
- dbus_launch_sources,
- include_directories: root_include,
- link_with: libdbus,
- dependencies: [ x11, ],
- install: true,
-)
-
+if message_bus
+ dbus_launch = executable('dbus-launch',
+ dbus_launch_sources,
+ include_directories: root_include,
+ link_with: libdbus,
+ dependencies: [ x11, ],
+ install: true,
+ )
+endif
dbus_monitor = executable('dbus-monitor',
'dbus-print-message.c',
@@ -57,13 +58,15 @@ dbus_monitor = executable('dbus-monitor',
install: true,
)
-dbus_run_session = executable('dbus-run-session',
- 'dbus-run-session.c',
- 'tool-common.c',
- include_directories: root_include,
- link_with: libdbus_internal,
- install: true,
-)
+if message_bus
+ dbus_run_session = executable('dbus-run-session',
+ 'dbus-run-session.c',
+ 'tool-common.c',
+ include_directories: root_include,
+ link_with: libdbus_internal,
+ install: true,
+ )
+endif
dbus_send = executable('dbus-send',
'dbus-print-message.c',