From 6c3e9577b7b9224f9f39b453f567fe52e304e934 Mon Sep 17 00:00:00 2001 From: Jamie McCrae Date: Tue, 16 Sep 2025 09:16:26 +0100 Subject: [PATCH] cmake: mcuboot: Add dependency to keys Adds a dependency that causes CMake to re-configure if the input key files for MCUboot signing/encryption have changed Signed-off-by: Jamie McCrae (cherry picked from commit 271dbb40158687f655eade1fea8ca144628ba20e) --- cmake/mcuboot.cmake | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmake/mcuboot.cmake b/cmake/mcuboot.cmake index 2767af807c124..fc38cfbce31e7 100644 --- a/cmake/mcuboot.cmake +++ b/cmake/mcuboot.cmake @@ -49,6 +49,9 @@ function(zephyr_mcuboot_tasks) elseif(NOT (CONFIG_BUILD_OUTPUT_BIN OR CONFIG_BUILD_OUTPUT_HEX)) message(FATAL_ERROR "Can't sign images for MCUboot: Neither CONFIG_BUILD_OUTPUT_BIN nor CONFIG_BUILD_OUTPUT_HEX is enabled, so there's nothing to sign.") endif() + + # Add key file as CMake dependency so a file change will rerun the build + set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${${file}}) endif() endforeach()