You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/en/api-guides/build-system.rst
+8-1Lines changed: 8 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -308,6 +308,8 @@ The list of directories in ``COMPONENT_DIRS`` is searched for the project's comp
308
308
309
309
When CMake runs to configure the project, it logs the components included in the build. This list can be useful for debugging the inclusion/exclusion of certain components.
310
310
311
+
.. _cmake-components-same-name:
312
+
311
313
Multiple components with the same name
312
314
--------------------------------------
313
315
@@ -1266,7 +1268,9 @@ the first element/member instead.
1266
1268
[LDFRAGMENTS ldfragment1 ldfragment2 ...]
1267
1269
[REQUIRED_IDF_TARGETS target1 target2 ...]
1268
1270
[EMBED_FILES file1 file2 ...]
1269
-
[EMBED_TXTFILES file1 file2 ...])
1271
+
[EMBED_TXTFILES file1 file2 ...]
1272
+
[KCONFIG kconfig]
1273
+
[KCONFIG_PROJBUILD kconfig_projbuild])
1270
1274
1271
1275
Register a component to the build system. Much like the ``project()`` CMake command, this should be called from the component's
1272
1276
CMakeLists.txt directly (not through a function or macro) and is recommended to be called before any other command. Here are some
@@ -1289,6 +1293,8 @@ The arguments for ``idf_component_register`` include:
1289
1293
- PRIV_REQUIRES - private component requirements for the component; ignored on config-only components
1290
1294
- LDFRAGMENTS - component linker fragment files
1291
1295
- REQUIRED_IDF_TARGETS - specify the only target the component supports
1296
+
- KCONFIG - override the default Kconfig file
1297
+
- KCONFIG_PROJBUILD - override the default Kconfig.projbuild file
1292
1298
1293
1299
The following are used for :ref:`embedding data into the component<cmake_embed_data>`, and is considered as source files
1294
1300
when determining if a component is config-only. This means that even if the component does not specify source files, a static library is still
@@ -1313,6 +1319,7 @@ For example, to get the directory of the ``freertos`` component:
1313
1319
- COMPONENT_ALIAS - alias for COMPONENT_LIB used for linking the component to external targets; set by ``idf_build_component`` and alias library itself
1314
1320
is created by ``idf_component_register``
1315
1321
- COMPONENT_DIR - component directory; set by ``idf_build_component``
1322
+
- COMPONENT_OVERRIDEN_DIR - contains the directory of the original component if ref:`this component overrides another component<cmake-components-same-name>`
1316
1323
- COMPONENT_LIB - name for created component static/interface library; set by ``idf_build_component`` and library itself
1317
1324
is created by ``idf_component_register``
1318
1325
- COMPONENT_NAME - name of the component; set by ``idf_build_component`` based on the component directory name
(idf.py reconfigure | grep "overriden_dir:$IDF_PATH/components/esp32") || failure "Failed to get overriden dir"# no registration, overrides registration as well
0 commit comments