Skip to content

xdgmime: find test programs via bare name first, and wire up subprojects

Instead of / in addition to hardcoding the path to the program name via a Meson option try to find just the name, first.

This means that there are two chances to find it, once via PATH or program overrides and once via specified location.

It is also possible to use the dirs: kwarg to find_program, but that requires raising the minimum version of Meson (to 0.53.0). Specifying two candidate names works quite well too, and is backwards-compatible.

Take advantage of this by:

  • adding an option to make the tests be required, so that Meson tries extra hard to find the programs by adding new subprojects into the build
  • adding a wrap file that automatically clones the xdgmime repository and builds it if the xdgmime programs cannot be found, then overrides the found programs using the built versions
Edited by Eli Schwartz

Merge request reports

Loading