py/py.cmake: Introduce MICROPY_INC_CORE as a list with core includes.

Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
Damien George 2021-04-09 00:59:16 +10:00
parent 0fabda31de
commit 5dcc9b3b16
4 changed files with 5 additions and 3 deletions

View File

@ -132,7 +132,7 @@ idf_component_register(
${MICROPY_SOURCE_DRIVERS} ${MICROPY_SOURCE_DRIVERS}
${MICROPY_SOURCE_PORT} ${MICROPY_SOURCE_PORT}
INCLUDE_DIRS INCLUDE_DIRS
${MICROPY_DIR} ${MICROPY_INC_CORE}
${MICROPY_INC_USERMOD} ${MICROPY_INC_USERMOD}
${MICROPY_PORT_DIR} ${MICROPY_PORT_DIR}
${MICROPY_BOARD_DIR} ${MICROPY_BOARD_DIR}

View File

@ -148,9 +148,9 @@ target_sources(${MICROPY_TARGET} PRIVATE
target_link_libraries(${MICROPY_TARGET} usermod) target_link_libraries(${MICROPY_TARGET} usermod)
target_include_directories(${MICROPY_TARGET} PRIVATE target_include_directories(${MICROPY_TARGET} PRIVATE
${MICROPY_INC_CORE}
${MICROPY_INC_USERMOD} ${MICROPY_INC_USERMOD}
"${PROJECT_SOURCE_DIR}" "${PROJECT_SOURCE_DIR}"
"${MICROPY_DIR}"
"${CMAKE_BINARY_DIR}" "${CMAKE_BINARY_DIR}"
) )

View File

@ -85,7 +85,7 @@ set(MICROPY_CPP_FLAGS_EXTRA ${includes} ${system_includes} ${definitions} ${opti
zephyr_library_named(${MICROPY_TARGET}) zephyr_library_named(${MICROPY_TARGET})
zephyr_library_include_directories( zephyr_library_include_directories(
${MICROPY_DIR} ${MICROPY_INC_CORE}
${MICROPY_PORT_DIR} ${MICROPY_PORT_DIR}
${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}
) )

View File

@ -2,6 +2,8 @@
set(MICROPY_PY_DIR "${MICROPY_DIR}/py") set(MICROPY_PY_DIR "${MICROPY_DIR}/py")
list(APPEND MICROPY_INC_CORE "${MICROPY_DIR}")
# All py/ source files # All py/ source files
set(MICROPY_SOURCE_PY set(MICROPY_SOURCE_PY
${MICROPY_PY_DIR}/argcheck.c ${MICROPY_PY_DIR}/argcheck.c