Skip to content

root_path

Required: No
Type: String
Condition: No

By default, all paths specified in a component are relative to their parent, meaning that paths in components that are part of an SDK or SDK extension are relative to the root of the SDK or SDK extension. Paths in standalone components are relative to the component file itself.

The root_path key can be used to append a prefix to all paths specified in the component.

The key component_root_path is accepted as an alias for root_path for backwards compatibility.

The following example references a file <sdk_root>/foo/bar/baz.c if the component is part of an SDK (or extension), and <component_root>/foo/bar/baz.c if the component is standalone. Note that the location of the .slcp file itself is irrelevant when part of an SDK.

1
2
3
root_path: foo/bar
source:
  - path: baz.c

SDK:

1
2
3
4
5
6
7
sdk
  sdk.slcs
  foo
    component
      component.slcp
    bar
      baz.c

Standalone:

1
2
3
4
5
component
  component.slcp
  foo
    bar
      baz.c

Back to top