1# SPDX-License-Identifier: Apache-2.0
2#
3# Copyright 2022 NXP
4
5# Add external project
6ExternalZephyrProject_Add(
7    APPLICATION openamp_remote
8    SOURCE_DIR ${APP_DIR}/remote
9    BOARD ${SB_CONFIG_OPENAMP_REMOTE_BOARD}
10  )
11
12# Add dependencies so that the remote sample will be built first
13# This is required because some primary cores need information from the
14# remote core's build, such as the output image's LMA
15add_dependencies(${DEFAULT_IMAGE} openamp_remote)
16sysbuild_add_dependencies(CONFIGURE ${DEFAULT_IMAGE} openamp_remote)
17
18if(SB_CONFIG_BOOTLOADER_MCUBOOT)
19  # Make sure MCUboot is flashed first
20  sysbuild_add_dependencies(FLASH openamp_remote mcuboot)
21endif()
22