diff --git a/soc/xtensa/nxp_adsp/CMakeLists.txt b/soc/xtensa/nxp_adsp/CMakeLists.txt index 2ca5d100db3fb7..cbe587a8304f23 100644 --- a/soc/xtensa/nxp_adsp/CMakeLists.txt +++ b/soc/xtensa/nxp_adsp/CMakeLists.txt @@ -5,16 +5,19 @@ add_subdirectory(common) +# use rimage only when compiling Sound Open Firmware (SOF) +if(CONFIG_SOF) # west sign # See detailed comments in soc/xtensa/intel_adsp/common/CMakeLists.txt -add_custom_target(zephyr.ri ALL - DEPENDS ${CMAKE_BINARY_DIR}/zephyr/zephyr.ri -) + add_custom_target(zephyr.ri ALL + DEPENDS ${CMAKE_BINARY_DIR}/zephyr/zephyr.ri + ) -add_custom_command( - OUTPUT ${CMAKE_BINARY_DIR}/zephyr/zephyr.ri - COMMENT "west sign --if-tool-available --tool rimage ..." - COMMAND west sign --if-tool-available --tool rimage --build-dir ${CMAKE_BINARY_DIR} - DEPENDS ${CMAKE_BINARY_DIR}/zephyr/zephyr.elf -) + add_custom_command( + OUTPUT ${CMAKE_BINARY_DIR}/zephyr/zephyr.ri + COMMENT "west sign --if-tool-available --tool rimage ..." + COMMAND west sign --if-tool-available --tool rimage --build-dir ${CMAKE_BINARY_DIR} + DEPENDS ${CMAKE_BINARY_DIR}/zephyr/zephyr.elf + ) +endif()