From 3dc41ff14cd43777556bd437f08bc85bba88cdbb Mon Sep 17 00:00:00 2001 From: xutao Date: Wed, 6 Jan 2021 21:43:40 +0800 Subject: [PATCH] CMake: fix some issues for CMake --- components/esp32/CMakeLists.txt | 2 +- components/esp_debug/CMakeLists.txt | 15 ++++----------- components/espcoredump/CMakeLists.txt | 2 +- 3 files changed, 6 insertions(+), 13 deletions(-) diff --git a/components/esp32/CMakeLists.txt b/components/esp32/CMakeLists.txt index dbacc35a7d..e1b0f5c8d7 100644 --- a/components/esp32/CMakeLists.txt +++ b/components/esp32/CMakeLists.txt @@ -53,7 +53,7 @@ else() "hwcrypto/sha.c") set(COMPONENT_ADD_INCLUDEDIRS "include") - set(COMPONENT_REQUIRES driver tcpip_adapter esp_event efuse) + set(COMPONENT_REQUIRES driver tcpip_adapter esp_event efuse esp_debug) # driver is a public requirement because esp_sleep.h uses gpio_num_t & touch_pad_t # tcpip_adapter is a public requirement because esp_event.h uses tcpip_adapter types # app_update is added here because cpu_start.c uses esp_ota_get_app_description() function. diff --git a/components/esp_debug/CMakeLists.txt b/components/esp_debug/CMakeLists.txt index 71db21e12a..5475ac6330 100644 --- a/components/esp_debug/CMakeLists.txt +++ b/components/esp_debug/CMakeLists.txt @@ -1,13 +1,6 @@ -idf_build_get_property(target IDF_TARGET) +set(COMPONENT_SRCS "src/esp_debug.c") +set(COMPONENT_ADD_INCLUDEDIRS "include") -set(srcs "src/esp_debug.c") +set(COMPONENT_PRIV_REQUIRES "lwip" "app_update" "esp32") -set(include_dirs - lwip/port/esp32/include - ) - -idf_component_register(SRCS "${srcs}" - INCLUDE_DIRS include - PRIV_INCLUDE_DIRS - REQUIRES esp_event lwip - PRIV_REQUIRES "${target}") +register_component() diff --git a/components/espcoredump/CMakeLists.txt b/components/espcoredump/CMakeLists.txt index 6f82362b59..0c554874ea 100644 --- a/components/espcoredump/CMakeLists.txt +++ b/components/espcoredump/CMakeLists.txt @@ -1,7 +1,7 @@ set(COMPONENT_PRIV_INCLUDEDIRS "include_core_dump") set(COMPONENT_ADD_INCLUDEDIRS "include") set(COMPONENT_REQUIRES) -set(COMPONENT_PRIV_REQUIRES spi_flash) +set(COMPONENT_PRIV_REQUIRES spi_flash app_update) set(COMPONENT_ADD_LDFRAGMENTS linker.lf) set(COMPONENT_SRCS "src/core_dump_common.c" "src/core_dump_flash.c"