From 11ef618bbc8b7d9afba5e8ab85e82e2a7b9326b6 Mon Sep 17 00:00:00 2001 From: Jim Mussared Date: Mon, 4 Jul 2022 11:21:58 +1000 Subject: [PATCH] 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 --- ports/rp2/CMakeLists.txt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ports/rp2/CMakeLists.txt b/ports/rp2/CMakeLists.txt index 198512f88..6314bfb44 100644 --- a/ports/rp2/CMakeLists.txt +++ b/ports/rp2/CMakeLists.txt @@ -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)