Skip to content

Commit

Permalink
sysbuild: set APPLICATION_BINARY_DIR to sysbuild CMake folder
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
tejlmand authored and nashif committed Jun 17, 2024
1 parent 4f712ff commit a54c117
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions share/sysbuild/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit a54c117

Please sign in to comment.