rp2/CMakeLists: Don't override cyw43-driver unless necessary.

This supresses a warning from pico-sdk when the board isn't using this
driver.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
This commit is contained in:
Jim Mussared 2022-07-04 11:21:58 +10:00 committed by Damien George
parent 5f4143dd40
commit 11ef618bbc
1 changed files with 5 additions and 2 deletions

View File

@ -16,8 +16,6 @@ endif()
# Use the local tinyusb instead of the one in pico-sdk
set(PICO_TINYUSB_PATH ${MICROPY_DIR}/lib/tinyusb)
# Use the local cyw43_driver instead of the one in pico-sdk
set(PICO_CYW43_DRIVER_PATH ${MICROPY_DIR}/lib/cyw43-driver)
# Use the local lwip instead of the one in pico-sdk
set(PICO_LWIP_PATH ${MICROPY_DIR}/lib/lwip)
@ -51,6 +49,11 @@ endif()
# A board may also have enabled additional components.
set(MICROPY_SSL_MBEDTLS ON)
# Use the local cyw43_driver instead of the one in pico-sdk
if (MICROPY_PY_NETWORK_CYW43)
set(PICO_CYW43_DRIVER_PATH ${MICROPY_DIR}/lib/cyw43-driver)
endif()
# Include component cmake fragments
include(${MICROPY_DIR}/py/py.cmake)
include(${MICROPY_DIR}/extmod/extmod.cmake)