diff --git a/CMakeLists.txt b/CMakeLists.txt index 72d9e28df728c1..fa68f9f3758c66 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1719,7 +1719,18 @@ endif() # Generate and use MCUboot related artifacts as needed. if(CONFIG_BOOTLOADER_MCUBOOT) - include(${CMAKE_CURRENT_LIST_DIR}/cmake/mcuboot.cmake) + get_target_property(signing_script zephyr_property_target SIGNING_SCRIPT) + if(NOT signing_script) + set_target_properties(zephyr_property_target PROPERTIES SIGNING_SCRIPT ${CMAKE_CURRENT_LIST_DIR}/cmake/mcuboot.cmake) + endif() +endif() + +# Include signing script, if set +get_target_property(signing_script zephyr_property_target SIGNING_SCRIPT) +if(signing_script) + message(STATUS "Including signing script: ${signing_script}") + + include(${signing_script}) endif() # Generate USB-C VIF policies in XML format