refactor(build): Streamline multi-app CMake configuration

Remove the top-level  and configure each application to directly include the  directory as a module or root. This simplifies the build process by making each application more self-contained while still allowing access to shared boards and libraries.
This commit is contained in:
Eduard Iten 2025-07-01 12:05:18 +02:00
parent 5ce96a662d
commit 842b204d36
3 changed files with 4 additions and 8 deletions

View File

@ -1,6 +0,0 @@
# Top-level CMakeLists.txt for the multi-app setup
cmake_minimum_required(VERSION 3.20)
add_subdirectory(apps/gateway)
add_subdirectory(apps/slave_node)

View File

@ -1,5 +1,8 @@
cmake_minimum_required(VERSION 3.20)
# Include the main 'software' directory as a module to find boards, libs, etc.
list(APPEND ZEPHYR_EXTRA_MODULES ${CMAKE_CURRENT_SOURCE_DIR}/../..)
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
project(gateway)

View File

@ -1,7 +1,6 @@
cmake_minimum_required(VERSION 3.20)
# Point BOARD_ROOT and DTS_ROOT to the main 'software' directory
# so Zephyr can find the 'boards' subdirectory there.
# Point BOARD_ROOT and DTS_ROOT to the 'software' directory, which contains 'boards'.
list(APPEND BOARD_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/../..)
list(APPEND DTS_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/../..)