zephyr/samples/sysbuild/hello_world/sysbuild.cmake
Jamie McCrae 88f30f3f51 samples: Use DEFAULT_IMAGE for sysbuild
Uses the variable for the default image when adding sysbuild
dependencies so that they can be copied out-of-tree and still work

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-06-28 20:54:25 -04:00

15 lines
425 B
CMake

# Copyright (c) 2024 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0
if("${SB_CONFIG_REMOTE_BOARD}" STREQUAL "")
message(FATAL_ERROR "REMOTE_BOARD must be set to a valid board name")
endif()
ExternalZephyrProject_Add(
APPLICATION remote
SOURCE_DIR ${APP_DIR}/remote
BOARD ${SB_CONFIG_REMOTE_BOARD}
)
add_dependencies(${DEFAULT_IMAGE} remote)
sysbuild_add_dependencies(FLASH ${DEFAULT_IMAGE} remote)