Updated Meson’s DBus dependency gating so that on macOS (darwin) with -Ddbus=auto, dbus-glib-1 is treated as optional instead of hard-required. This prevents configure-time failure in Homebrew CI environments where dbus-glib-1 is absent, while preserving strict behavior when -Ddbus=enabled is explicitly set.

Kept the existing libcanberra and surrounding dependency flow intact; only the required: logic for dbus-glib-1 was adjusted.
This commit is contained in:
2026-02-18 11:53:12 -07:00
parent 125c69c1b0
commit 505449f165

View File

@@ -18,7 +18,11 @@ libgmodule_dep = dependency('gmodule-2.0')
libcanberra_dep = dependency('libcanberra', version: '>= 0.22',
required: get_option('libcanberra'))
dbus_glib_dep = dependency('dbus-glib-1', required: get_option('dbus'))
dbus_required = get_option('dbus')
if host_machine.system() == 'darwin' and dbus_required.auto()
dbus_required = false
endif
dbus_glib_dep = dependency('dbus-glib-1', required: dbus_required)
global_deps = []
if cc.get_id() == 'msvc'