External program (program)
Opaque object representing an external program
Returned by
External program objects are returned by the following functions and methods:
External program methods
program.cmd_array()
Returns an array containing the command(s) for the program.
Signature
(since 1.10.0)
[] cmd_array()
program.found()
Returns whether the executable was found.
Signature
found()
program.full_path()
Returns a string pointing to the script or executable.
NOTE: You should not usually need to use this method. Passing the object itself should work in most contexts where a program can appear, and allows Meson to setup inter-target dependencies correctly (for example in cases where a program might be overridden by a ). Only use this if you specifically need a string, such as when embedding a program path into a header file, or storing it into an environment variable.
For example:
run_command(find_program('foo'), 'arg1', 'arg2')
Signature
(since 0.55.0)
full_path()
program.path()
Returns a string pointing to the script or executable.
NOTE: You should not usually need to use this method. Passing the object itself should work in most contexts where a program can appear, and allows Meson to setup inter-target dependencies correctly (for example in cases where a program might be overridden by a ). Only use this if you specifically need a string, such as when embedding a program path into a header file, or storing it into an environment variable.
For example:
run_command(find_program('foo'), 'arg1', 'arg2')
Signature
DEPRECATED
in 0.55.0
path()
program.version()
The version number as a string, for example 1.2.8.
unknown if the program cannot determine the version via a --version argument.
Signature
(since 0.62.0)
version()
The results of the search are