Applications can consume library components that you create in the same workspace.
Before you build the application, configure the following entries in UserConfig.cmake.
- USER_INCLUDE_DIRECTORIES
- USER_LINK_DIRECTORIES
- USER_LINK_LIBRARIES
After you configure these entries, the IDE links the application against the specified library artifacts during the build process.
This workflow enables code reuse across multiple applications without duplicating source files. The workflow separates library and application responsibilities.
Creating Library Components from the Command Line
You can create library components from the CLI/Python flow for automation and CI/CD workflows.
Use the Vitis Python API create_library_component flow with:
- Platform selection
- Domain selection (bare-metal for static libraries, Linux for dynamic libraries where the release supports it)
- Source import
- Component build
For static library flows, the IDE uses Lopper to extract hardware metadata that it then uses during build configuration generation.