From 5dcc9b3b16cf6a27acf01bdf8a7d23ae2aff56e3 Mon Sep 17 00:00:00 2001 From: Damien George Date: Fri, 9 Apr 2021 00:59:16 +1000 Subject: [PATCH] py/py.cmake: Introduce MICROPY_INC_CORE as a list with core includes. Signed-off-by: Damien George --- ports/esp32/main/CMakeLists.txt | 2 +- ports/rp2/CMakeLists.txt | 2 +- ports/zephyr/CMakeLists.txt | 2 +- py/py.cmake | 2 ++ 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/ports/esp32/main/CMakeLists.txt b/ports/esp32/main/CMakeLists.txt index 1f4bb3175b..2bfc09558e 100644 --- a/ports/esp32/main/CMakeLists.txt +++ b/ports/esp32/main/CMakeLists.txt @@ -132,7 +132,7 @@ idf_component_register( ${MICROPY_SOURCE_DRIVERS} ${MICROPY_SOURCE_PORT} INCLUDE_DIRS - ${MICROPY_DIR} + ${MICROPY_INC_CORE} ${MICROPY_INC_USERMOD} ${MICROPY_PORT_DIR} ${MICROPY_BOARD_DIR} diff --git a/ports/rp2/CMakeLists.txt b/ports/rp2/CMakeLists.txt index 5f3cdebd87..100a834090 100644 --- a/ports/rp2/CMakeLists.txt +++ b/ports/rp2/CMakeLists.txt @@ -148,9 +148,9 @@ target_sources(${MICROPY_TARGET} PRIVATE target_link_libraries(${MICROPY_TARGET} usermod) target_include_directories(${MICROPY_TARGET} PRIVATE + ${MICROPY_INC_CORE} ${MICROPY_INC_USERMOD} "${PROJECT_SOURCE_DIR}" - "${MICROPY_DIR}" "${CMAKE_BINARY_DIR}" ) diff --git a/ports/zephyr/CMakeLists.txt b/ports/zephyr/CMakeLists.txt index 08868d716d..716642979a 100644 --- a/ports/zephyr/CMakeLists.txt +++ b/ports/zephyr/CMakeLists.txt @@ -85,7 +85,7 @@ set(MICROPY_CPP_FLAGS_EXTRA ${includes} ${system_includes} ${definitions} ${opti zephyr_library_named(${MICROPY_TARGET}) zephyr_library_include_directories( - ${MICROPY_DIR} + ${MICROPY_INC_CORE} ${MICROPY_PORT_DIR} ${CMAKE_CURRENT_BINARY_DIR} ) diff --git a/py/py.cmake b/py/py.cmake index be5deca251..2b5d437b57 100644 --- a/py/py.cmake +++ b/py/py.cmake @@ -2,6 +2,8 @@ set(MICROPY_PY_DIR "${MICROPY_DIR}/py") +list(APPEND MICROPY_INC_CORE "${MICROPY_DIR}") + # All py/ source files set(MICROPY_SOURCE_PY ${MICROPY_PY_DIR}/argcheck.c