From 832128e864c66d4ed64c46865a00aa2331cebddf Mon Sep 17 00:00:00 2001 From: Frantisek Hrbata Date: Fri, 10 Oct 2025 13:43:27 +0200 Subject: [PATCH] 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 --- tools/cmakev2/component.cmake | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/cmakev2/component.cmake b/tools/cmakev2/component.cmake index 4fd0feede0b..0b169753b2e 100644 --- a/tools/cmakev2/component.cmake +++ b/tools/cmakev2/component.cmake @@ -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}")