mirror of
https://github.com/espressif/esp-idf.git
synced 2026-04-27 19:13:21 +00:00
feat(cmakev2/compat): link common components in idf_component_register
Automatically link commonly required components to the component target created in the idf_component_register function. This is still necessary even in cmakev2, as existing components depend on this behavior. Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
This commit is contained in:
@@ -253,6 +253,11 @@ function(idf_component_register)
|
||||
__get_compile_options(OUTPUT compile_options)
|
||||
add_compile_options("${compile_options}")
|
||||
|
||||
idf_build_get_property(common_component_interfaces __COMMON_COMPONENT_INTERFACES)
|
||||
idf_component_get_property(component_interface "${COMPONENT_NAME}" COMPONENT_INTERFACE)
|
||||
list(REMOVE_ITEM common_component_interfaces ${component_interface})
|
||||
link_libraries(${common_component_interfaces})
|
||||
|
||||
__get_absolute_paths(PATHS "${ARG_INCLUDE_DIRS}" BASE_DIR "${COMPONENT_DIR}" OUTPUT include_dirs)
|
||||
__get_absolute_paths(PATHS "${ARG_PRIV_INCLUDE_DIRS}" BASE_DIR "${COMPONENT_DIR}" OUTPUT priv_include_dirs)
|
||||
foreach(dir IN LISTS include_dirs priv_include_dirs)
|
||||
|
||||
Reference in New Issue
Block a user