Skip to content

Commit

Permalink
cmake: Allow extending/replacing signing functionality
Browse files Browse the repository at this point in the history
Allows extended or replacing the default MCUboot signing
functionality by using a cmake property which can be set by modules
if alternate or modified signing functionality is required.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
  • Loading branch information
nordicjm authored and fabiobaltieri committed Mar 29, 2023
1 parent 65b8ce5 commit 176c805
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 176c805

Please sign in to comment.