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:
parent
5ce96a662d
commit
842b204d36
|
|
@ -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)
|
|
||||||
|
|
@ -1,5 +1,8 @@
|
||||||
cmake_minimum_required(VERSION 3.20)
|
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})
|
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
|
||||||
project(gateway)
|
project(gateway)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
cmake_minimum_required(VERSION 3.20)
|
cmake_minimum_required(VERSION 3.20)
|
||||||
|
|
||||||
# Point BOARD_ROOT and DTS_ROOT to the main 'software' directory
|
# Point BOARD_ROOT and DTS_ROOT to the 'software' directory, which contains 'boards'.
|
||||||
# so Zephyr can find the 'boards' subdirectory there.
|
|
||||||
list(APPEND BOARD_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/../..)
|
list(APPEND BOARD_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/../..)
|
||||||
list(APPEND DTS_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/../..)
|
list(APPEND DTS_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/../..)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue