mirror of
https://github.com/zephyrproject-rtos/zephyr
synced 2025-08-19 08:55:22 +00:00
This is one way we can support out of tree board definitions. Basically all this needs is a board definition in the application source directory that follows the same structure we have in the main Zephyr tree (also allowing multiple custom boards). An application tree would look like this for example: boards/ CMakeLists.txt prj.conf README.rst src/ with boards following the same structure as in Zephyr: . ├── boards │ └── x86 │ └── arduino_101 │ ├── doc │ │ └── img │ └── support └── src To use this, you need to specify the BOARD_ROOT variable on the command line when building: cmake -DBOARD=<board name> -DBOARD_ROOT=<path to boards> .. Signed-off-by: Anas Nashif <anas.nashif@intel.com>
11 lines
273 B
CMake
11 lines
273 B
CMake
# To avoid a lot of empty CMakeLists.txt files we assume it is not an
|
|
# error if it is missing
|
|
|
|
if(EXISTS ${BOARD_DIR}/CMakeLists.txt)
|
|
if(BOARD_ROOT)
|
|
add_subdirectory(${BOARD_DIR} boards/${ARCH}/${BOARD})
|
|
else()
|
|
add_subdirectory(${BOARD_DIR})
|
|
endif()
|
|
endif()
|