summaryrefslogtreecommitdiff
path: root/docs/yaml/functions
AgeCommit message (Collapse)Author
2025-12-17docs: fix documentation for build_target(install_dir)Dylan Baker
2025-12-15docs(summary): Correct example outputFrank Dana
The sample output for the example failed to jibe with reality in several ways: - 'prefix' was not included in the inputs, so it isn't displayed - Boolean values are printed lowercase ('true', not 'True') - The array formatting would be properly aligned
2025-12-11Add closing backtick to the install_headers docsAlex Rao
This commit adds a closing backtick to the mention of `configure_file()`, that way it shows up correctly as preformatted
2025-11-17docs: fix typoSertonix
2025-11-17rust: allow either crate names or target names in the dependency mapPaolo Bonzini
Since commit 44ce04537 ("cargo: Add library API version into its name", 2025-10-28), the target names provided by cargo subprojects have a suffix corresponding to the library API; for example, the target that used to be "gtk4" is now "gtk4+0_10". This however is an implementation detail, and the change broke rust_dependency_maps that expected to use the crate name. While the target name is preferrable, and will work great when Meson is able to create dependency maps by itself (as is the case for the Cargo interpreter), preserve the old behavior by checking also the entry corresponding to the result of _get_rust_crate_name. Reported-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-11-17docs: clarify documentation for rust_dependency_mapPaolo Bonzini
Give a practical example of how it is used. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-11-14Add `shortname' kwarg for a short DLL name on OS/2KO Myung-Hun
Give an user opportunities to mangle a custom short name for a DLL on OS/2.
2025-11-04Add build target keyword parameter 'build_subdir' [v8]Keith Packard
Place the build products in a directory of the specified name somewhere within the build directory. This allows use of the target that includes a specific directory name: #include <subdir/configure.h> This also allows creating targets with the same basename by using different subdirectory names. v2: Move build_subdir to Target class. Error if path separator in build_dir v3: Rename to 'build_subdir' to make it clear that the name is appended to a meson-specific build directory, and does not provide the user with a way to define the overall meson build hierarchy. Allow build_subdir to include path separators. Support 'build_subdir' for configure_file. build_subdir must not exist in the source directory and must not contain '..' Add documentation and tests v4: Rebase and prepare for version 1.9.1 Add failing test case when build_subdir is present in the project. Add release note snippet v5: Clarify wording on restrictions on the value of build_subdir. Use the same wording in each place this restriction is described. v6: Move path validation to shared function, validate_build_subdir, instead of duplicating the tests in two places. v7: Update version numbers to 1.10.0 Add TypedDict updates. Remove spurious build_subdir instance variable v8: Oops, missed one version number update. Signed-off-by: Keith Packard <keithp@keithp.com>
2025-10-29Add snippets.symbol_visibility_header() methodXavier Claessens
Defining public API in a cross platform library is painful, especially on Windows. Since every library have to define pretty much the same macros, better do it in Meson.
2025-10-20docs: Not all dependencies use `prefer_static` when `static` is unsetDylan Baker
Cuda, for example, doesn't use `prefer_static`, and will always link statically unless the static value is explicitly set to `true`. This updates the documentation to reflect that.
2025-10-15revert local_program()Eli Schwartz
This reverts https://github.com/mesonbuild/meson/pull/15107 Explicit objections regarding the design were raised and not answered, so it shouldn't have been merged. It needs to be discussed and revisited.
2025-10-15docs: Fix documentation about sources accepted by BuildTarget(extra_files: )Dylan Baker
2025-10-15build: remove build layer validation of Executable(implib)Dylan Baker
This includes cleaning up some of the type handling to account for cleanups that are done at the DSL level.
2025-10-15Add interpreter kwarg to local_program()Xavier Claessens
2025-10-15Add local_program() functionXavier Claessens
2025-10-08docs: Add vala_header, vala_vapi, and vala_gir to build_target docsDylan Baker
Which have existed for a *long* time, but are only documented in the Vala docs.
2025-10-05Document that custom_target outputs cannot be in a subdirectorySupreeeme
2025-07-28docs: Reduce reading comprehension requirements for install functionsNirbheek Chauhan
As we are becoming more popular, the docs have to be clearer because we're being exposed to a wider base of users with highly variable English language ability. Some of those can be helped with translations, but for the rest, let's repeat ourselves. Fixes https://github.com/mesonbuild/meson/issues/14843
2025-07-22Docs: standardize between list and array as arrayDylan Baker
When arrays were added they were called arrays. Because the are implemented with Python lists, that language started leaking into talking about Meson types. This is confusing. I've attempted, as much as possible, to move to using one name, array. I picked array because 1) It's the original name used, and 2) what Meson has are more properly arrays as they have a fixed length, while a critical property of lists are the ability to link and unlink them. There are a couple of places where the list language has leaked into the names of keyword arguments. I have not made any attempt to change those, I don't know if it's that useful or not.
2025-07-14docs: document missing languages in project()meator
2025-07-14interpreter: allow retrieving build options with get_option()Paolo Bonzini
Fixes: #14788 Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-07-07docs: update project(default_options: ...) for 1.8 changesPaolo Bonzini
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-04-17android: Added android_exe_type kwargs to executableFlorian "sp1rit"​
By setting android_exe_type to `application`, the executable gets actually built as a shared library instead of an executable. This makes it possible to use an application within an android application process. mesonbuild#13758 https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/7555/
2025-01-21docs: clarify use cases for declare_dependency()LaserEyess
2024-11-06vcs_tag: Add install kwargsXavier Claessens
Fixes: #4893
2024-09-11Fix typosspaette
2024-09-11Harmonize d_import_dirs and include_directories behavior.Andrew McNulty
This commit harmonizes the handling of `d_import_dirs` and `include_directories`. The treatment of `d_import_dirs` was also different depending on the context: in `declare_dependency` it was treated like the `include_directories`, but in `build_target` et al, it had special treatment. With this commit, they are all treated by the same function. The documentation has been updated to reflect this. Fixes #12742
2024-09-06alias_target with both_libs builds bothCharles Brunet
2024-08-27Allow external programs in test()'s 'args' parameterDavid Gibson
Although it's not especially common, there are certainly cases where it's useful to pass the path to an external program to a test program. Fixes: https://github.com/mesonbuild/meson/issues/3552 Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2024-08-04docs: document prefer_static effect on dependency()Sertonix
Ref https://github.com/mesonbuild/meson/pull/9603
2024-07-11docs: Add some commas to subdir_done() descriptionWill Thompson
It's subjective but I think that breaking the sentences in this way makes them easier to follow.
2024-07-11docs: Fix typo in subdir_done() descriptionWill Thompson
2024-06-23find_program: add a kwarg to specify custom version argumentDudemanguy
When trying to get the version of a program, meson was previously hardcoded to run the binary with `--version`. This does work with the vast majority of programs, but there are a few outliers (e.g. ffmpeg) which have an unusual argument for printing out the version. Support these programs by introducing a version_argument kwarg in find_program which allows users to override `--version` with whatever the custom argument for printing the version may be for the program.
2024-05-09implement @PLAINNAME0@ and @BASENAME0@Stas Sergeev
@PLAINNAME@ and @BASENAME@ cannot be used in custom_target() with multiple inputs. For those, similar macros are needed with an index. Fixes #13164
2024-04-05depends keyword argument: accept CustomTargetIndexGerion Entrup
That holds for all of these meson function: run_target, generator and custom_target and additionally to the Windows and Gnome module.
2024-02-24Allow using CustomTarget as test executableCharles Brunet
Fixes #6567
2024-02-23mtest: set MSAN_OPTIONS to abort by defaultSam James
Followup to 7b7d2e060b447de9c2642848847370a58711ac1c which handles ASAN and UBSAN. It turns out that MSAN needs the same treatment. I've checked other sanitizers like HWASAN and TSAN - it looks like they may both need it too, but Meson doesn't currently suppose those anyway (see https://github.com/mesonbuild/meson/pull/12648). Signed-off-by: Sam James <sam@gentoo.org> Signed-off-by: Eli Schwartz <eschwartz93@gmail.com>
2024-02-18doc: fix descriptions of dependency and find_programEisuke Kawashima
They accept list as documented
2024-02-12doc: benchmark: correct usage on unixtaz-007
2024-02-09Document that alias_target accepts run_tgts since 0.60.0Tristan Partin
This was implemented in dc51740e2cdee171ac6ebc7ed261e5c08730c9a9, but was not added to the documentation or marked as a new feature.
2023-11-22docs/dependency: fix type of version kwargGerion Entrup
2023-10-19mtest: set ASAN_OPTIONS and UBSAN_OPTIONS to abort by defaultSam James
Do as we do for MALLOC_PERTURB and set a sensible value for both ASAN_OPTIONS and UBSAN_OPTIONS to abort on failure and give more helpful output at the same time. We do not set these options if the user has exported a value themselves to allow override. In the last week alone, I've observed two cases where people were expecting sanitizers to abort on failure and were surprised when it didn't: 1) https://github.com/git/git/commit/252d693797912ddb2684733160170f0408b73274 2) https://gitlab.freedesktop.org/pipewire/pipewire/-/commit/c47df433f7bc9936fc59b323ca5e53ea4a04f40e Correct this - which is in-line with meson's DWIM/DTRT philosophy. Signed-off-by: Sam James <sam@gentoo.org>
2023-10-09interpreter: add <lang>_(static|shared)_argsDylan Baker
Which allow passing arguments specifically to the static or shared libraries. For design, this is all handled in the interpreter, by the build layer the arguments are combined into the existing fields. This limits changes required in the mid and backend layers
2023-10-09interpreter: Handle BuildTarget.vala_args as Files in the interpreterDylan Baker
Way back in Meson 0.25, support was added to `vala_args` for Files. Strangely, this was never added to any other language, though it's been discussed before. For type safety, it makes more sense to handle this in the interpreter level, and pass only strings into the build IR. This is accomplished by adding a `depend_files` field to the `BuildTarget` class (which is not exposed to the user), and adding the depend files into that field, while converting the arguments to relative string paths. This ensures both the proper build dependencies happen, as well as that the arguments are always strings.
2023-10-05build: use suffix when getting target id for exesDudemanguy
When checking target names, meson explictly forbids having multiple targets with the same name. This is good, but it is strict and it is impossible to have targets with the same basename and differing suffixes (e.g. foo and foo.bin) in the same directory. Allow this for executables by including the suffix (if it exists) in the interal target id. So foo would be foo@exe and foo.bin would be foo.bin@exe.
2023-09-28add support for vs_module_defs to ExecutablesDylan Baker
fixes: #9254
2023-09-28fix using a CustomTargetIndex for vs_module_defsDylan Baker
Because `CustomTargetIndex`es don't have a `subdir` property, but they do implement the `get_subdir()` method
2023-09-19docs: fix `add_project_link_arguments` documentationBenoit Pierre
It should refer to `add_project_arguments`, not `add_global_arguments`.
2023-09-19Rust: Replace rust_crate_type with rust_abiXavier Claessens
Meson already knows if it's a shared or static library, user only need to specify the ABI (Rust or C).
2023-09-13install_{data,headers,subdir}: implement follow_symlinksArsen Arsenović
This permits users who rely on following symlinks to stay on the old default of following them.