summaryrefslogtreecommitdiff
path: root/docs/yaml
diff options
context:
space:
mode:
authorDudemanguy <random342@airmail.cc>2024-06-22 10:59:05 -0500
committerJussi Pakkanen <jpakkane@gmail.com>2024-06-23 15:10:42 +0300
commit9be6e653d49957c974af2c171257cbaf942abbb9 (patch)
tree788b00fc4997ec587ccc64e21cba1b7d7f030dc1 /docs/yaml
parenta111c28ecef721af960721c26b40f4e5108760c7 (diff)
downloadmeson-9be6e653d49957c974af2c171257cbaf942abbb9.tar.gz
find_program: add a kwarg to specify custom version argument
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.
Diffstat (limited to 'docs/yaml')
-rw-r--r--docs/yaml/functions/find_program.yaml9
1 files changed, 8 insertions, 1 deletions
diff --git a/docs/yaml/functions/find_program.yaml b/docs/yaml/functions/find_program.yaml
index 4a17e8637..1899941ab 100644
--- a/docs/yaml/functions/find_program.yaml
+++ b/docs/yaml/functions/find_program.yaml
@@ -102,13 +102,20 @@ kwargs:
since: 0.52.0
description: |
Specifies the required version, see
- [[dependency]] for argument format. The version of the program
+ [[dependency]] for argument format. By default, the version of the program
is determined by running `program_name --version` command. If stdout is empty
it fallbacks to stderr. If the output contains more text than simply a version
number, only the first occurrence of numbers separated by dots is kept.
If the output is more complicated than that, the version checking will have to
be done manually using [[run_command]].
+ version_argument:
+ type: str
+ since: 1.5.0
+ description: |
+ Specifies the argument to pass when trying to find the version of the program.
+ If this is unspecified, `program_name --version` will be used.
+
dirs:
type: list[str]
since: 0.53.0