summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorDamien George <damien@micropython.org>2021-04-09 00:59:16 +1000
committerDamien George <damien@micropython.org>2021-04-09 13:08:35 +1000
commit5dcc9b3b16cf6a27acf01bdf8a7d23ae2aff56e3 (patch)
tree991f3ef221f7f26d0fabcc5f2434a200e33e1619
parent0fabda31de33b38c6858925d9195731deba6f54a (diff)
downloadmicropython-5dcc9b3b16cf6a27acf01bdf8a7d23ae2aff56e3.tar.gz
micropython-5dcc9b3b16cf6a27acf01bdf8a7d23ae2aff56e3.zip
py/py.cmake: Introduce MICROPY_INC_CORE as a list with core includes.
Signed-off-by: Damien George <damien@micropython.org>
-rw-r--r--ports/esp32/main/CMakeLists.txt2
-rw-r--r--ports/rp2/CMakeLists.txt2
-rw-r--r--ports/zephyr/CMakeLists.txt2
-rw-r--r--py/py.cmake2
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