rp2/CMakeLists: Allow relative MICROPY_BOARD_DIR when invoking cmake.

Convert to an absolute path to always reliably locate manifest.py.  This is
already done in Makefile, but is also needed in CMakeLists.txt if cmake is
invoked directly.

Signed-off-by: Phil Howard <phil@pimoroni.com>
pull/11538/head
Phil Howard 2023-05-04 21:25:52 +01:00 zatwierdzone przez Damien George
rodzic f9958417d8
commit 4ce360fa83
1 zmienionych plików z 1 dodań i 0 usunięć

Wyświetl plik

@ -31,6 +31,7 @@ endif()
if(NOT MICROPY_BOARD_DIR)
set(MICROPY_BOARD_DIR ${MICROPY_PORT_DIR}/boards/${MICROPY_BOARD})
endif()
get_filename_component(MICROPY_BOARD_DIR ${MICROPY_BOARD_DIR} ABSOLUTE)
if(NOT EXISTS ${MICROPY_BOARD_DIR}/mpconfigboard.cmake)
message(FATAL_ERROR "Invalid MICROPY_BOARD specified: ${MICROPY_BOARD}")
endif()