From 1047384ac30ff0e9f93d6dc5e60bd136f7295669 Mon Sep 17 00:00:00 2001 From: Wang Qixiang <43193572+wqx6@users.noreply.github.com> Date: Wed, 3 Nov 2021 01:15:32 +0800 Subject: [PATCH] Simplify the include dirs for ESP examples (#11301) --- config/esp32/components/chip/CMakeLists.txt | 2 ++ examples/all-clusters-app/esp32/main/CMakeLists.txt | 10 ++-------- examples/bridge-app/esp32/main/CMakeLists.txt | 4 ---- examples/lock-app/esp32/main/CMakeLists.txt | 5 ----- examples/shell/esp32/main/CMakeLists.txt | 2 -- .../esp32/main/CMakeLists.txt | 4 ---- 6 files changed, 4 insertions(+), 23 deletions(-) diff --git a/config/esp32/components/chip/CMakeLists.txt b/config/esp32/components/chip/CMakeLists.txt index b006777e7d73ea..967c2c6fcfd374 100644 --- a/config/esp32/components/chip/CMakeLists.txt +++ b/config/esp32/components/chip/CMakeLists.txt @@ -176,6 +176,8 @@ target_include_directories(${COMPONENT_LIB} INTERFACE "${CHIP_ROOT}/src/include" "${CHIP_ROOT}/src/lib" "${CHIP_ROOT}/src" + "${CHIP_ROOT}/zzz_generated/app-common" + "${CHIP_ROOT}/examples/platform/esp32" "${CHIP_ROOT}/third_party/nlassert/repo/include" "${CHIP_ROOT}/third_party/nlio/repo/include" "${CMAKE_CURRENT_BINARY_DIR}/src/include" diff --git a/examples/all-clusters-app/esp32/main/CMakeLists.txt b/examples/all-clusters-app/esp32/main/CMakeLists.txt index 4ddaced3059673..f83c88729a9b0d 100644 --- a/examples/all-clusters-app/esp32/main/CMakeLists.txt +++ b/examples/all-clusters-app/esp32/main/CMakeLists.txt @@ -19,22 +19,17 @@ # The list of src and include dirs must be in sync with that in all-clusters-app/esp32/main/component.mk set(PRIV_INCLUDE_DIRS_LIST "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/all-clusters-app" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/app-common" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/all-clusters-app/all-clusters-common" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/third_party/nlio/repo/include" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src" "${CMAKE_CURRENT_LIST_DIR}/include" ) set(SRC_DIRS_LIST "${CMAKE_CURRENT_LIST_DIR}" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/all-clusters-app/zap-generated" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/app-common/app-common/zap-generated" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/app-common/app-common/zap-generated/attributes" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/app-common/app-common/zap-generated" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/shell_extension" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/util" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/reporting" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/administrator-commissioning-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/test-cluster-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/descriptor" @@ -59,14 +54,13 @@ set(SRC_DIRS_LIST "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/media-playback-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/ota-provider" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/target-navigator-server" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/thread_network_diagnostics_server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/thread_network_diagnostics_server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/tv-channel-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/scenes" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/software_diagnostics_server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/general_diagnostics_server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/basic" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/bindings" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/reporting" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/diagnostic-logs-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/door-lock-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/occupancy-sensor-server" diff --git a/examples/bridge-app/esp32/main/CMakeLists.txt b/examples/bridge-app/esp32/main/CMakeLists.txt index 083b0253c031e5..9d524d5d131721 100644 --- a/examples/bridge-app/esp32/main/CMakeLists.txt +++ b/examples/bridge-app/esp32/main/CMakeLists.txt @@ -15,11 +15,7 @@ # limitations under the License. idf_component_register(PRIV_INCLUDE_DIRS - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/bridge-app/bridge-common" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/bridge-app" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/app-common" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32" "${CMAKE_CURRENT_LIST_DIR}/include" SRC_DIRS "${CMAKE_CURRENT_LIST_DIR}" diff --git a/examples/lock-app/esp32/main/CMakeLists.txt b/examples/lock-app/esp32/main/CMakeLists.txt index b91ba9c2157a56..ccc299805c384d 100644 --- a/examples/lock-app/esp32/main/CMakeLists.txt +++ b/examples/lock-app/esp32/main/CMakeLists.txt @@ -26,8 +26,6 @@ idf_component_register(INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/../../common/pigweed/esp32" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/lib/support" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/lock-app/" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/app-common/" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src" "${CMAKE_CURRENT_LIST_DIR}/include" "${IDF_PATH}/components/freertos/include/freertos" SRC_DIRS @@ -122,10 +120,7 @@ target_include_directories(${chip_lib} PUBLIC else (CONFIG_ENABLE_PW_RPC) idf_component_register(PRIV_INCLUDE_DIRS - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/lock-app/" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/app-common/" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32" "${CMAKE_CURRENT_LIST_DIR}/include" SRC_DIRS "${CMAKE_CURRENT_LIST_DIR}" diff --git a/examples/shell/esp32/main/CMakeLists.txt b/examples/shell/esp32/main/CMakeLists.txt index 1ae5765d1aef96..1fef9da8a3ec17 100644 --- a/examples/shell/esp32/main/CMakeLists.txt +++ b/examples/shell/esp32/main/CMakeLists.txt @@ -24,7 +24,5 @@ idf_component_register(SRCS main.cpp "${CHIP_SHELL_DIR}/shell_common/cmd_ping.cpp" "${CHIP_SHELL_DIR}/shell_common/cmd_send.cpp" PRIV_INCLUDE_DIRS - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/app-common" "${CHIP_SHELL_DIR}/shell_common/include" PRIV_REQUIRES chip nvs_flash bt console esp32_mbedtls) diff --git a/examples/temperature-measurement-app/esp32/main/CMakeLists.txt b/examples/temperature-measurement-app/esp32/main/CMakeLists.txt index cdbe1dd6aa36a8..e6f66af4bbbe28 100644 --- a/examples/temperature-measurement-app/esp32/main/CMakeLists.txt +++ b/examples/temperature-measurement-app/esp32/main/CMakeLists.txt @@ -17,11 +17,7 @@ # # (Uses default behaviour of compiling all source files in directory, adding 'include' to include path.) idf_component_register(PRIV_INCLUDE_DIRS - "${CMAKE_CURRENT_LIST_DIR}" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/third_party/nlio/repo/include" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/temperature-measurement-app/" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/app-common/" "${CMAKE_CURRENT_LIST_DIR}/include" SRC_DIRS "${CMAKE_CURRENT_LIST_DIR}"