sysbuild: set APPLICATION_BINARY_DIR to sysbuild CMake folder
If not defined by caller, then set APPLICATION_BINARY_DIR to
CMAKE_CURRENT_BINARY_DIR. This is normally be done by
`find_package(Zephyr)`, but due to the indirection introduced with
fc1884ecf5
to allow applications to
provide their own sysbuild entry point, then the APPLICATION_BINARY_DIR
is unexpectedly set to the bin dir of the entry point.
Restore the old behavior so that APPLICATION_BINARY_DIR per default
again points to top-level sysbuild binary dir.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
This commit is contained in:
parent
4f712fffe0
commit
a54c117223
1 changed files with 4 additions and 0 deletions
|
@ -16,6 +16,10 @@ set(Sysbuild_DIR ${CMAKE_CURRENT_LIST_DIR}/../sysbuild-package/cmake)
|
|||
|
||||
project(sysbuild_toplevel LANGUAGES)
|
||||
|
||||
if(NOT DEFINED APPLICATION_BINARY_DIR)
|
||||
set(APPLICATION_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR} CACHE PATH "Application Binary Directory")
|
||||
endif()
|
||||
|
||||
if(EXISTS ${APP_DIR}/sysbuild/CMakeLists.txt)
|
||||
add_subdirectory(${APP_DIR}/sysbuild sysbuild/application)
|
||||
else()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue