rp2/CMakeLists.txt: Allow a board to override PICO_BOARD.

Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
Damien George 2022-01-06 16:49:57 +11:00
parent d4997c7b60
commit 4693cf9081

View File

@ -25,11 +25,6 @@ if(NOT MICROPY_BOARD)
set(MICROPY_BOARD PICO)
endif()
# Set the PICO_BOARD if it's not already set.
if(NOT PICO_BOARD)
string(TOLOWER ${MICROPY_BOARD} PICO_BOARD)
endif()
# Set the board directory and check that it exists.
if(NOT MICROPY_BOARD_DIR)
set(MICROPY_BOARD_DIR ${MICROPY_PORT_DIR}/boards/${MICROPY_BOARD})
@ -41,6 +36,11 @@ endif()
# Include board config
include(${MICROPY_BOARD_DIR}/mpconfigboard.cmake)
# Set the PICO_BOARD if it's not already set (allow a board to override it).
if(NOT PICO_BOARD)
string(TOLOWER ${MICROPY_BOARD} PICO_BOARD)
endif()
# Include component cmake fragments
include(${MICROPY_DIR}/py/py.cmake)
include(${MICROPY_DIR}/extmod/extmod.cmake)