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.
91 lines
3.6 KiB
91 lines
3.6 KiB
3 years ago
|
name: project
|
||
|
returns: void
|
||
|
description: |
|
||
|
The first function called in each project, to initialize Meson.
|
||
|
|
||
|
The first argument to this function must be a string defining the name
|
||
|
of this project.
|
||
|
|
||
|
The project name can be any string you want, it's not used for
|
||
|
anything except descriptive purposes. However since it is written to
|
||
|
e.g. the dependency manifest is usually makes sense to have it be the
|
||
|
same as the project tarball or pkg-config name. So for example you
|
||
|
would probably want to use the name _libfoobar_ instead of _The Foobar
|
||
|
Library_.
|
||
|
|
||
|
It may be followed by the list of programming languages that the project uses.
|
||
|
|
||
|
*(since 0.40.0)* The list of languages is optional.
|
||
|
|
||
|
These languages may be used both for `native: false` (the default)
|
||
|
(host machine) targets and for `native: true` (build machine) targets.
|
||
|
*(since 0.56.0)* The build machine compilers for the specified
|
||
|
languages are not required.
|
||
|
|
||
|
Supported values for languages are `c`, `cpp` (for `C++`), `cuda`, `d`,
|
||
|
`objc`, `objcpp`, `fortran`, `java`, `cs` (for `C#`), `vala` and `rust`.
|
||
|
|
||
|
posargs:
|
||
|
project_name:
|
||
|
type: str
|
||
|
description: The name of the project.
|
||
|
|
||
|
varargs:
|
||
|
name: language
|
||
|
type: str
|
||
|
description: The languages that Meson should initialize.
|
||
|
|
||
|
kwargs:
|
||
|
default_options:
|
||
|
type: list[str]
|
||
|
description: |
|
||
|
Accecpts strings in the form `key=value`
|
||
|
which have the same format as options to `meson configure`.
|
||
|
For example to set the default project type you would
|
||
|
set this: `default_options : ['buildtype=debugoptimized']`. Note
|
||
|
that these settings are only used when running Meson for the first
|
||
|
time. Global options such as `buildtype` can only be specified in
|
||
|
the master project, settings in subprojects are ignored. Project
|
||
|
specific options are used normally even in subprojects.
|
||
|
|
||
|
version:
|
||
|
type: str | file
|
||
|
description: |
|
||
|
A free form string describing the version of this project.
|
||
|
You can access the value in your Meson build files
|
||
|
with [[meson.project_version]]. *(Since 0.57.0)* this can also be a
|
||
|
[[@file]] object pointing to a file that contains exactly one line of
|
||
|
text.
|
||
|
|
||
|
meson_version:
|
||
|
type: str
|
||
|
description: |
|
||
|
Takes a string describing which Meson version the project requires.
|
||
|
Usually something like `>=0.28.0`.
|
||
|
|
||
|
license:
|
||
|
type: str | list[str]
|
||
|
description: |
|
||
|
Takes a string or array of strings describing the license(s) the code is under.
|
||
|
To avoid ambiguity it is recommended to use a standardized
|
||
|
license identifier from the [SPDX license list](https://spdx.org/licenses/).
|
||
|
Usually this would be something like `license : 'GPL-2.0-or-later'`, but if
|
||
|
the code has multiple licenses you can specify them as an array like this:
|
||
|
`license : ['proprietary', 'GPL-3.0-only']`. Note that the text is informal
|
||
|
and is only written to the dependency manifest. Meson does not do any license
|
||
|
validation, you are responsible for verifying that you abide by all licensing
|
||
|
terms. You can access the value in your Meson build files with
|
||
|
`meson.project_license()`.
|
||
|
|
||
|
subproject_dir:
|
||
|
type: str
|
||
|
default: "'subprojects'"
|
||
|
description: |
|
||
|
Specifies the top level directory name that holds Meson subprojects.
|
||
|
This is only meant as a compatibility option
|
||
|
for existing code bases that house their embedded source code in a
|
||
|
custom directory. All new projects should not set this but instead
|
||
|
use the default value. It should be noted that this keyword
|
||
|
argument is ignored inside subprojects. There can be only one
|
||
|
subproject dir and it is set in the top level Meson file.
|