From 5bfbcfc91cdae6b0f379dd72ba1aad11aa6e2bc3 Mon Sep 17 00:00:00 2001 From: Aron Rubin Date: Tue, 18 May 2021 06:49:32 -0400 Subject: [PATCH] Added condition to only use tinyusb as needed (#5123) * Added condition to only use tinyusb as needed * Removed esp32c3 from targets supporting tinyusb --- CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f6332f54..17b064c3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -161,8 +161,11 @@ set(includedirs set(srcs ${CORE_SRCS} ${LIBRARY_SRCS} ${BLE_SRCS}) set(priv_includes cores/esp32/libb64) set(requires spi_flash mbedtls mdns esp_adc_cal) -set(priv_requires fatfs nvs_flash app_update spiffs bootloader_support openssl bt arduino_tinyusb main) +set(priv_requires fatfs nvs_flash app_update spiffs bootloader_support openssl bt main) +if(IDF_TARGET MATCHES "esp32s2|esp32s3" AND CONFIG_TINYUSB_ENABLED) + list(APPEND priv_requires arduino_tinyusb) +endif() if(NOT CONFIG_ARDUINO_SELECTIVE_COMPILATION OR CONFIG_ARDUINO_SELECTIVE_ArduinoOTA) list(APPEND priv_requires esp_https_ota) endif()