Skip to content

meson: Override "dbus-1" dependency name

Barnabás Pőcze requested to merge pobrn/dbus:override_dep_name into master
Since meson 0.54.0, it is possible to override a dependency name,
so do that to make it easy to use dbus as a subproject. After this
change, simply

  dependency('dbus-1')

will fall back to the subproject automatically and there is no need
for using `fallback` keyword argument. Of course this assumes that
the dbus source tree is at subprojects/dbus-1 and not subprojects/dbus
but it is easy to achieve that.

If the dbus source tree for some reason needs to be at subprojects/dbus,

  dependency('dbus-1', fallback: 'dbus')

may be used, which still has the advantage of not needing to
depend on the variable names in the dbus build definitions.

Merge request reports