8000 rp2/CMake: Normalize MICROPY_PORT_DIR. · duncf/micropython@ea8f0fd · GitHub
[go: up one dir, main page]

Skip to content

Commit ea8f0fd

Browse files
committed
rp2/CMake: Normalize MICROPY_PORT_DIR.
In 5fe2a3f the ESP32 port underwent a change to how `MICROPY_PORT_DIR` is defined. This commit normalizes the `rp2` port to use the same underlying variable mechanism (`CMAKE_CURRENT_LIST_DIR`). Signed-off-by: Brian 'redbeard' Harrington <redbeard@dead-city.org>
1 parent 5fe2a3f commit ea8f0fd

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

ports/rp2/CMakeLists.txt

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ set(PICO_TINYUSB_PATH ${MICROPY_DIR}/lib/tinyusb)
2020
set(PICO_LWIP_PATH ${MICROPY_DIR}/lib/lwip)
2121

2222
# Set the location of this port's directory.
23-
set(MICROPY_PORT_DIR ${CMAKE_SOURCE_DIR})
23+
set(MICROPY_PORT_DIR ${CMAKE_CURRENT_LIST_DIR})
2424

2525
# Set the board if it's not already set.
2626
if(NOT MICROPY_BOARD)
@@ -80,7 +80,7 @@ include(${MICROPY_DIR}/py/usermod.cmake)
8080
add_executable(${MICROPY_TARGET})
8181

8282
set(MICROPY_QSTRDEFS_PORT
83-
${PROJECT_SOURCE_DIR}/qstrdefsport.h
83+
${MICROPY_PORT_DIR}/qstrdefsport.h
8484
)
8585

8686
set(MICROPY_SOURCE_LIB
@@ -146,20 +146,20 @@ set(MICROPY_SOURCE_QSTR
146146
${MICROPY_DIR}/shared/readline/readline.c
147147
${MICROPY_DIR}/shared/runtime/mpirq.c
148148
${MICROPY_DIR}/shared/runtime/sys_stdio_mphal.c
149-
${PROJECT_SOURCE_DIR}/machine_adc.c
150-
${PROJECT_SOURCE_DIR}/machine_i2c.c
151-
${PROJECT_SOURCE_DIR}/machine_i2s.c
152-
${PROJECT_SOURCE_DIR}/machine_pin.c
153-
${PROJECT_SOURCE_DIR}/machine_rtc.c
154-
${PROJECT_SOURCE_DIR}/machine_spi.c
155-
${PROJECT_SOURCE_DIR}/machine_timer.c
156-
${PROJECT_SOURCE_DIR}/machine_uart.c
157-
${PROJECT_SOURCE_DIR}/machine_wdt.c
158-
${PROJECT_SOURCE_DIR}/modmachine.c
159-
${PROJECT_SOURCE_DIR}/modrp2.c
160-
${PROJECT_SOURCE_DIR}/modos.c
161-
${PROJECT_SOURCE_DIR}/rp2_flash.c
162-
${PROJECT_SOURCE_DIR}/rp2_pio.c
149+
${MICROPY_PORT_DIR}/machine_adc.c
150+
${MICROPY_PORT_DIR}/machine_i2c.c
151+
${MICROPY_PORT_DIR}/machine_i2s.c
152+
${MICROPY_PORT_DIR}/machine_pin.c
153+
${MICROPY_PORT_DIR}/machine_rtc.c
154+
${MICROPY_PORT_DIR}/machine_spi.c
155+
${MICROPY_PORT_DIR}/machine_timer.c
156+
${MICROPY_PORT_DIR}/machine_uart.c
157+
${MICROPY_PORT_DIR}/machine_wdt.c
158+
${MICROPY_PORT_DIR}/modmachine.c
159+
${MICROPY_PORT_DIR}/modrp2.c
160+
${MICROPY_PORT_DIR}/modos.c
161+
${MICROPY_PORT_DIR}/rp2_flash.c
162+
${MICROPY_PORT_DIR}/rp2_pio.c
163163
${CMAKE_BINARY_DIR}/pins_${MICROPY_BOARD}.c
164164
)
165165

@@ -343,7 +343,7 @@ set(MICROPY_CROSS_FLAGS -march=armv6m)
343343
if (MICROPY_USER_FROZEN_MANIFEST)
344344
set(MICROPY_FROZEN_MANIFEST ${MICROPY_USER_FROZEN_MANIFEST})
345345
elseif (NOT MICROPY_FROZEN_MANIFEST)
346-
set(MICROPY_FROZEN_MANIFEST ${PROJECT_SOURCE_DIR}/boards/manifest.py)
346+
set(MICROPY_FROZEN_MANIFEST ${MICROPY_PORT_DIR}/boards/manifest.py)
347347
endif()
348348

349349
target_sources(${MICROPY_TARGET} PRIVATE
@@ -362,7 +362,7 @@ target_include_directories(${MICROPY_TARGET} PRIVATE
362362
${MICROPY_INC_CORE}
363363
${MICROPY_INC_USERMOD}
364364
${MICROPY_BOARD_DIR}
365-
"${PROJECT_SOURCE_DIR}"
365+
"${MICROPY_PORT_DIR}"
366366
"${CMAKE_BINARY_DIR}"
367367
)
368368

0 commit comments

Comments
 (0)
0