fix(cmakev2/component): set the cmakev2 component archive name

Currently, the archive file name is set only in the cmakev1
idf_component_register shim. The predictable component archive file name
is important, for example, for usage in linker fragments. Ensure that
the cmakev2 component also has the archive file name set.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
This commit is contained in:
Frantisek Hrbata
2025-11-04 07:48:15 +01:00
parent 6f516845fc
commit 832128e864
+3
View File
@@ -1012,6 +1012,9 @@ function(idf_component_include name)
return()
endif()
# Set the component archive file name.
set_target_properties(${component_real_target} PROPERTIES OUTPUT_NAME ${component_name} LINKER_LANGUAGE C)
idf_build_get_property(include_directories INCLUDE_DIRECTORIES GENERATOR_EXPRESSION)
target_include_directories("${component_real_target}" BEFORE PRIVATE "${include_directories}")