1# Copyright (c) 2023 Nordic Semiconductor
2#
3# SPDX-License-Identifier: Apache-2.0
4
5# This sysbuild CMake file sets the sysbuild controlled settings as properties
6# on the main Zephyr image.
7
8set_config_bool(${ZCMAKE_APPLICATION} CONFIG_BOOTLOADER_MCUBOOT "${SB_CONFIG_BOOTLOADER_MCUBOOT}")
9set_config_string(${ZCMAKE_APPLICATION} CONFIG_MCUBOOT_SIGNATURE_KEY_FILE
10                  "${SB_CONFIG_BOOT_SIGNATURE_KEY_FILE}"
11)
12set_config_string(${ZCMAKE_APPLICATION} CONFIG_MCUBOOT_ENCRYPTION_KEY_FILE
13                  "${SB_CONFIG_BOOT_ENCRYPTION_KEY_FILE}"
14)
15
16if(SB_CONFIG_BOOTLOADER_MCUBOOT)
17  if("${SB_CONFIG_SIGNATURE_TYPE}" STREQUAL "NONE")
18    set_config_bool(${ZCMAKE_APPLICATION} CONFIG_MCUBOOT_GENERATE_UNSIGNED_IMAGE y)
19  else()
20    set_config_bool(${ZCMAKE_APPLICATION} CONFIG_MCUBOOT_GENERATE_UNSIGNED_IMAGE n)
21  endif()
22endif()
23