Skip to content

meson.build: let meson handle the prefix + bindir concatination

Peter Hutterer requested to merge whot/wireplumber:wip/meson-prefix-dirs into master

For bindir, libdir and datadir, meson enforces that either

  • the value is an absolute path that is a subdir of $prefix
  • the value is a relative path that is then made a subdir of $prefix

Example meson error message: ERROR: The value of the 'bindir' option is '/usr/foobar' which must be a subdir of the prefix '/usr/local'. Note that if you pass a relative path, it is assumed to be a subdir of prefix.

And meson handles absolute paths for those directories correctly (ignoring $prefix), so we don't need to manually compose those.

Only exception is sysconfdir which may be outside the prefix but there too meson handles an absolute path correctly.

Merge request reports