Skip to content

Commit a54c117

Browse files
tejlmandnashif
authored andcommitted
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 fc1884e 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 <[email protected]>
1 parent 4f712ff commit a54c117

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

share/sysbuild/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ set(Sysbuild_DIR ${CMAKE_CURRENT_LIST_DIR}/../sysbuild-package/cmake)
1616

1717
project(sysbuild_toplevel LANGUAGES)
1818

19+
if(NOT DEFINED APPLICATION_BINARY_DIR)
20+
set(APPLICATION_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR} CACHE PATH "Application Binary Directory")
21+
endif()
22+
1923
if(EXISTS ${APP_DIR}/sysbuild/CMakeLists.txt)
2024
add_subdirectory(${APP_DIR}/sysbuild sysbuild/application)
2125
else()

0 commit comments

Comments
 (0)