The Meson Build System http://mesonbuild.com/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

1.2 KiB

Project and built-in options can be set in native or cross files

A new set of sections has been added to the cross and native files, [project options] and [<subproject_name>:project options], where subproject_name is the name of a subproject. Any options that are allowed in the project can be set from this section. They have the lowest precedent, and will be overwritten by command line arguments.

option('foo', type : 'string', value : 'foo')
[project options]
foo = 'other val'
meson build --native-file my.ini

Will result in the option foo having the value other val,

meson build --native-file my.ini -Dfoo='different val'

Will result in the option foo having the value different val,

Subproject options are assigned like this:

[zlib:project options]
foo = 'some val'

Additionally meson level options can be set in the same way, using the [built-in options] section.

[built-in options]
c_std = 'c99'

These options can also be set on a per-subproject basis, although only default_library and werror can currently be set:

[zlib:built-in options]
default_library = 'static'