New features (in development)

clang-cl now accepts cpp_std=c++20

Requires clang-cl 13 or later.

coercing values in the option() function is deprecated

Currently code such as:

option('foo', type : 'boolean', value : 'false')

works, because Meson coerces 'false' to false.

This should be avoided, and will now result in a deprecation warning.

New declare_dependency(objects: ) argument

A new argument to declare_dependency makes it possible to add objects directly to executables that use an internal dependency, without going for example through link_whole.

Dump devenv into file and select format

meson devenv --dump [<filename>] command now takes an optional filename argument to write the environment into a file instead of printing to stdout.

A new --dump-format argument has been added to select which shell format should be used. There are currently 3 formats supported:

  • sh: Lines are in the format VAR=/prepend:$VAR:/append.
  • export: Same as sh but with extra export VAR lines.
  • vscode: Same as sh but without $VAR substitution because they do not seems to be properly supported by vscode.

Generated objects can be passed in the objects: keyword argument

In previous versions of Meson, generated objects could only be passed as sources of a build target. This was confusing, therefore generated objects can now be passed in the objects: keyword argument as well.

The project function now supports setting the project license files

This goes together with the license name. The license files can be automatically installed via meson.install_dependency_manifest(), or queried via meson.project_license_files().

A new core directory option "licensedir" is available

This will install a dependency manifest to the specified directory, if none is is explicitly set.

The results of the search are