-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
## 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. |