From 0009a7dc305b9cce693b2e3fe94174c85dc1ef2e Mon Sep 17 00:00:00 2001 From: Damien George Date: Thu, 24 Jun 2021 16:03:25 +1000 Subject: [PATCH] esp32/main: Allow MICROPY_DIR to be overridden. This is necessary when building a custom out-of-tree board. Signed-off-by: Damien George --- ports/esp32/main/CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ports/esp32/main/CMakeLists.txt b/ports/esp32/main/CMakeLists.txt index 1cc30b71e..d01656e56 100644 --- a/ports/esp32/main/CMakeLists.txt +++ b/ports/esp32/main/CMakeLists.txt @@ -1,5 +1,7 @@ # Set location of base MicroPython directory. -get_filename_component(MICROPY_DIR ${PROJECT_DIR}/../.. ABSOLUTE) +if(NOT MICROPY_DIR) + get_filename_component(MICROPY_DIR ${PROJECT_DIR}/../.. ABSOLUTE) +endif() # Include core source components. include(${MICROPY_DIR}/py/py.cmake) -- GitLab