diff options
| author | Jussi Pakkanen <jpakkane@gmail.com> | 2018-04-22 19:41:21 +0300 |
|---|---|---|
| committer | Jussi Pakkanen <jpakkane@gmail.com> | 2018-04-23 03:24:26 +0300 |
| commit | ade59f987f40707d7f5fb43727b0de249a373469 (patch) | |
| tree | f393814f81556b47764aab95558a6ef6a262d783 /docs/markdown/snippets/find-override.md | |
| parent | 01865899e5283b3e0b3181ddb250c348a5bafa84 (diff) | |
| download | meson-ade59f987f40707d7f5fb43727b0de249a373469.tar.gz | |
Updated version number for new release.0.46.0
Diffstat (limited to 'docs/markdown/snippets/find-override.md')
| -rw-r--r-- | docs/markdown/snippets/find-override.md | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/docs/markdown/snippets/find-override.md b/docs/markdown/snippets/find-override.md deleted file mode 100644 index ef3a4a2fd..000000000 --- a/docs/markdown/snippets/find-override.md +++ /dev/null @@ -1,37 +0,0 @@ -## Can override find_program - -It is now possible to override the result of `find_program` to point -to a custom program you want. The overriding is global and applies to -every subproject from there on. Here is how you would use it. - -In master project - -```meson -subproject('mydep') -``` - -In the called subproject: - -```meson -prog = find_program('my_custom_script') -meson.override_find_program('mycodegen', prog) -``` - -In master project (or, in fact, any subproject): - -```meson -genprog = find_program('mycodegen') -``` - -Now `genprog` points to the custom script. If the dependency had come -from the system, then it would point to the system version. - -You can also use the return value of `configure_file()` to override -a program in the same way as above: - -```meson -prog_script = configure_file(input : 'script.sh.in', - output : 'script.sh', - configuration : cdata) -meson.override_find_program('mycodegen', prog_script) -``` |
