summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLiPeng <[email protected]>2025-09-11 16:53:25 +0800
committersakumisu <[email protected]>2025-09-11 17:00:45 +0800
commit5ea75a14d004da93d793966e31b9a63f579be74c (patch)
tree0533639be71b4059559361b345d989aedbea230e
parente748e55f4d25a591106cd1aa74bec09d6dd860a4 (diff)
fix: Remove usb component private requirement for idf v6
-rw-r--r--CMakeLists.txt6
1 files changed, 5 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7c6c7e62..00e2ddc7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -64,6 +64,10 @@ elseif(ESP_PLATFORM)
idf_component_get_property(freertos_include freertos ORIG_INCLUDE_PATH)
+ set(priv_req esp_mm esp_netif esp_timer)
+ if(${IDF_VERSION_MAJOR} LESS 6)
+ list(APPEND priv_req usb)
+ endif()
idf_component_register(
SRCS
${cherryusb_srcs}
@@ -71,7 +75,7 @@ elseif(ESP_PLATFORM)
${cherryusb_incs}
${freertos_include}
PRIV_REQUIRES
- usb esp_mm esp_netif esp_timer
+ ${priv_req}
LDFRAGMENTS
${ldfragments}
)