From 2a0a3c0661955152ce16d9d90961a4214151e3cf Mon Sep 17 00:00:00 2001 From: lhdjply Date: Wed, 24 Jul 2024 10:06:19 +0800 Subject: [PATCH] update Signed-off-by: lhdjply --- ports/esp32/main/CMakeLists.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ports/esp32/main/CMakeLists.txt b/ports/esp32/main/CMakeLists.txt index b186cc1685bc4..ac17428c07a19 100644 --- a/ports/esp32/main/CMakeLists.txt +++ b/ports/esp32/main/CMakeLists.txt @@ -108,7 +108,6 @@ set(IDF_COMPONENTS bootloader_support bt driver - esp_adc_cal esp_common esp_eth esp_event @@ -135,6 +134,12 @@ set(IDF_COMPONENTS nghttp ) +if(IDF_VERSION_MAJOR GREATER_EQUAL 5) + list(APPEND IDF_COMPONENTS esp_adc) +elseif(IDF_VERSION_MAJOR GREATER_EQUAL 4) + list(APPEND IDF_COMPONENTS esp_adc_cal) +endif() + if(IDF_VERSION_MINOR GREATER_EQUAL 1 OR IDF_VERSION_MAJOR GREATER_EQUAL 5) list(APPEND IDF_COMPONENTS esp_netif) endif()