blob: 91ee9bf4b6bbc6c2da6382c0daee36be68e38ff6 [file] [log] [blame]
# Copyright 2024 NXP
#
# SPDX-License-Identifier: Apache-2.0
if("${SB_CONFIG_REMOTE_BOARD}" STREQUAL "")
message(FATAL_ERROR
"Target ${BOARD} not supported for this sample. "
"There is no remote board selected in Kconfig.sysbuild")
endif()
set(REMOTE_APP remote)
ExternalZephyrProject_Add(
APPLICATION ${REMOTE_APP}
SOURCE_DIR ${APP_DIR}/${REMOTE_APP}
BOARD ${SB_CONFIG_REMOTE_BOARD}
)
if ("${BOARD}" STREQUAL "mimxrt1170_evkb" OR
"${BOARD}" STREQUAL "mimxrt1170_evk" OR
"${BOARD}" STREQUAL "mimxrt1160_evk"
)
# For these NXP boards the main core application is dependent on
# 'zephyr_image_info.h' generated by remote application.
# Let's build the remote application first
add_dependencies(${DEFAULT_IMAGE} ${REMOTE_APP})
endif()