aboutsummaryrefslogtreecommitdiff
path: root/docs/yaml/functions/subdir.yaml
blob: 694fa518fadb4d268f27248d60705aa5fb134770 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
name: subdir
returns: void
description: |
  Enters the specified subdirectory and executes the `meson.build` file in it.
  Once that is done, it returns and execution continues on the
  line following this `subdir()` command. Variables defined in that
  `meson.build` file are then available for use in later parts of the
  current build file and in all subsequent build files executed with
  `subdir()`.

  Note that this means that each `meson.build` file in a source tree can
  and must only be executed once.

posargs:
  dir_name:
    type: str
    description: Directory relative to the current `meson.build` to enter.

kwargs:
  if_found:
    type: list[dep]
    since: 0.44.0
    description: Only enter the subdir if all [[dep.found]] methods return `true`.