summaryrefslogtreecommitdiff
path: root/docs/yaml/functions/local_program.yaml
blob: d91867b020bc153f35cc0dc9dd1fb2cd6101bbc8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: local_program
returns: external_program
since: 1.10.0
description: |
  Similar to [[find_program]], but only work with a program that exists in
  source tree, or a built target. Meson will not look for the program in the
  system or in a subproject.

  In addition, `depends` keyword argument can be specified in case the program
  depends on built targets, for example a Python script could require a compiled
  C module. If any such dependency is present, the program can only be used in
  build-time commands (e.g. [[custom_target]]).

  The program can be passed to [[meson.override_find_program]] and used in
  subprojects.

posargs:
  program:
    type: str | file | exe | custom_tgt | custom_idx
    description: |
      A [[@file]] object or the name of a program in the current source directory.

kwargs:
  depend_files:
    type: array[str | file]
    description: |
      files ([[@str]],
      [[@file]], or the return value of [[configure_file]] that
      this target depends on. Useful for adding regen dependencies.

  depends:
    type: array[build_tgt | custom_tgt | custom_idx]
    description: |
      Specifies that this target depends on the specified
      target(s). If specified, this program can only be used at build time,
      after those targets have been built.