forked from espressif/esp-idf
Merge branch 'feat/plugins_trim_build' into 'master'
feat(examples): trim down the plugins example build Closes IDF-11779 See merge request espressif/esp-idf!36185
This commit is contained in:
@@ -3,4 +3,6 @@
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
|
||||
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
||||
# "Trim" the build. Include the minimal set of components, main, and plugins.
|
||||
set(COMPONENTS main plugin_hello plugin_nihao)
|
||||
project(plugins)
|
||||
|
@@ -52,6 +52,14 @@ For each plugin, a structure describing the plugin (or a pointer to it) is place
|
||||
|
||||
## Example code overview
|
||||
|
||||
This example uses the optional `COMPONENTS` project variable to streamline the build process. By specifying components in this variable, only those components and their dependencies are linked to the application, reducing build time. Additionally, listing plugin components in the `COMPONENTS` variable ensures that only the specified plugins are linked. This approach provides a convenient way to quickly select the plugins to include in the application. The `COMPONENTS` variable is set in the project's CMakeLists.txt file:
|
||||
|
||||
```cmake
|
||||
set(COMPONENTS main plugin_hello plugin_nihao)
|
||||
```
|
||||
|
||||
For details about the `COMPONENTS` project variable, please refer to the Build System documentation.
|
||||
|
||||
This example contains 4 components:
|
||||
|
||||
* `main` — Only calls two sample functions defined in `plugins` component.
|
||||
|
Reference in New Issue
Block a user