From 00dc661db92bf39df068f252f2059969e0374c55 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..297bee1e3fda0 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_cal) +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()