Skip to content

Commit

Permalink
Simplify the include dirs for ESP examples (project-chip#11301)
Browse files Browse the repository at this point in the history
  • Loading branch information
wqx6 authored and PSONALl committed Dec 2, 2021
1 parent 72160b4 commit 19f5539
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 23 deletions.
2 changes: 2 additions & 0 deletions config/esp32/components/chip/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
10 changes: 2 additions & 8 deletions examples/all-clusters-app/esp32/main/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
Expand Down
4 changes: 0 additions & 4 deletions examples/bridge-app/esp32/main/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down
5 changes: 0 additions & 5 deletions examples/lock-app/esp32/main/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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}"
Expand Down
2 changes: 0 additions & 2 deletions examples/shell/esp32/main/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down

0 comments on commit 19f5539

Please sign in to comment.