Skip to content

library

Required: No
Type: List of libraries
Condition: Yes

List of libraries to link with. Libraries can be system libraries or full paths to archives.

System Library

Key Required Type Description
system Yes String Name of the system library, such as m or gcc
condition No List of features The library is added if all the given features are present
unless No List of features The library is added unless any of the given features are present

SDK Library

Key Required Type Description
path Yes String Path to a library in the project
condition No List of features The library is added if all the given features are present
unless No List of features The library is added unless any of the given features are present
directory No String Only supported for libraries where path points to a location outside the project root. If the project is copied, the file is moved to this directory relative to the project root and the project file is rewritten to reflect the new layout. If not set, a default of . is assumed. If the project is not copied, the value of directory may be used to show the file at a virtual location in IDEs that support this.

Example

1
2
3
4
5
6
7
library:
  - system: m
    condition:
      - toolchain_gcc
  - path: path/to/gcc/armv7m/libfoo.a
    condition:
      - armv7m
Back to top