Skip to content

Commit 4b58ad2

Browse files
authored
examples: Remove requires in main components for esp32 examples (#33213)
1 parent 1b9d971 commit 4b58ad2

File tree

14 files changed

+17
-66
lines changed

14 files changed

+17
-66
lines changed

examples/all-clusters-app/esp32/main/CMakeLists.txt

+3-14
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,8 @@ set(SRC_DIRS_LIST
9696
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/time-synchronization-server"
9797
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/valve-configuration-and-control-server"
9898
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/dishwasher-alarm-server"
99-
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/laundry-washer-controls-server"
100-
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/laundry-washer-controls-server"
99+
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/laundry-washer-controls-server"
100+
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/laundry-washer-controls-server"
101101
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/laundry-dryer-controls-server"
102102
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/all-clusters-app/all-clusters-common/src"
103103
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/energy-preference-server"
@@ -136,20 +136,9 @@ if (CONFIG_ENABLE_ICD_SERVER)
136136
list(APPEND SRC_DIRS_LIST "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/icd")
137137
endif()
138138

139-
set(PRIV_REQUIRES_LIST chip QRCode bt app_update nvs_flash spi_flash openthread)
140-
141-
if(${IDF_TARGET} STREQUAL "esp32")
142-
list(APPEND PRIV_REQUIRES_LIST spidriver screen-framework)
143-
endif()
144-
145-
if(CONFIG_DEVICE_TYPE_ESP32_C3_DEVKITM)
146-
list(APPEND PRIV_REQUIRES_LIST led_strip)
147-
endif()
148-
149139
idf_component_register(PRIV_INCLUDE_DIRS ${PRIV_INCLUDE_DIRS_LIST}
150140
SRC_DIRS ${SRC_DIRS_LIST}
151-
EXCLUDE_SRCS ${EXCLUDE_SRCS}
152-
PRIV_REQUIRES ${PRIV_REQUIRES_LIST})
141+
EXCLUDE_SRCS ${EXCLUDE_SRCS})
153142

154143
get_filename_component(CHIP_ROOT ${CMAKE_SOURCE_DIR}/third_party/connectedhomeip REALPATH)
155144

examples/all-clusters-minimal-app/esp32/main/CMakeLists.txt

+2-13
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ set(SRC_DIRS_LIST
8282
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/door-lock-server"
8383
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/occupancy-sensor-server"
8484
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/device-energy-management-server"
85-
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/energy-evse-server"
85+
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/energy-evse-server"
8686
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/ethernet-network-diagnostics-server"
8787
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/localization-configuration-server"
8888
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/time-format-localization-server"
@@ -118,19 +118,8 @@ set(SRC_DIRS_LIST "${SRC_DIRS_LIST}"
118118
)
119119
endif (CONFIG_ENABLE_PW_RPC)
120120

121-
set(PRIV_REQUIRES_LIST chip QRCode bt driver app_update nvs_flash spi_flash openthread)
122-
123-
if(${IDF_TARGET} STREQUAL "esp32")
124-
list(APPEND PRIV_REQUIRES_LIST spidriver screen-framework)
125-
endif()
126-
127-
if(CONFIG_DEVICE_TYPE_ESP32_C3_DEVKITM)
128-
list(APPEND PRIV_REQUIRES_LIST led_strip)
129-
endif()
130-
131121
idf_component_register(PRIV_INCLUDE_DIRS ${PRIV_INCLUDE_DIRS_LIST}
132-
SRC_DIRS ${SRC_DIRS_LIST}
133-
PRIV_REQUIRES ${PRIV_REQUIRES_LIST})
122+
SRC_DIRS ${SRC_DIRS_LIST})
134123

135124
get_filename_component(CHIP_ROOT ${CMAKE_SOURCE_DIR}/third_party/connectedhomeip REALPATH)
136125

examples/bridge-app/esp32/main/CMakeLists.txt

+1-2
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,7 @@ idf_component_register(PRIV_INCLUDE_DIRS
4848
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/operational-credentials-server"
4949
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/general-commissioning-server"
5050
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/common"
51-
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/providers"
52-
PRIV_REQUIRES chip QRCode bt nvs_flash)
51+
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/providers")
5352

5453
get_filename_component(CHIP_ROOT ${CMAKE_SOURCE_DIR}/third_party/connectedhomeip REALPATH)
5554

examples/chef/esp32/main/CMakeLists.txt

-1
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,6 @@ endif (CONFIG_ENABLE_PW_RPC)
118118
idf_component_register(PRIV_INCLUDE_DIRS
119119
"${CHIP_SHELL_DIR}/shell_common/include"
120120
"${PRIV_INCLUDE_DIRS_LIST}"
121-
PRIV_REQUIRES chip nvs_flash bt console mbedtls QRCode tft screen-framework spidriver
122121
SRC_DIRS ${SRC_DIRS_LIST})
123122

124123
# Forces the linker to include common/stubs.cpp

examples/energy-management-app/esp32/main/CMakeLists.txt

+1-8
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,6 @@ set(SRC_DIRS_LIST
7272
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/electrical-power-measurement-server"
7373
)
7474

75-
set(PRIV_REQUIRES_LIST chip QRCode bt led_strip app_update openthread driver nvs_flash spi_flash)
76-
77-
if(${IDF_TARGET} STREQUAL "esp32")
78-
list(APPEND PRIV_REQUIRES_LIST spidriver screen-framework)
79-
endif()
80-
8175

8276
if (CONFIG_ENABLE_PW_RPC)
8377
# Append additional directories for RPC build
@@ -103,8 +97,7 @@ set(SRC_DIRS_LIST "${SRC_DIRS_LIST}"
10397
endif (CONFIG_ENABLE_PW_RPC)
10498

10599
idf_component_register(PRIV_INCLUDE_DIRS ${PRIV_INCLUDE_DIRS_LIST}
106-
SRC_DIRS ${SRC_DIRS_LIST}
107-
PRIV_REQUIRES ${PRIV_REQUIRES_LIST})
100+
SRC_DIRS ${SRC_DIRS_LIST})
108101
get_filename_component(CHIP_ROOT ${CMAKE_SOURCE_DIR}/third_party/connectedhomeip REALPATH)
109102

110103
include("${CHIP_ROOT}/build/chip/esp32/esp32_codegen.cmake")

examples/light-switch-app/esp32/main/CMakeLists.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ idf_component_register(PRIV_INCLUDE_DIRS
5959
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/groups-server"
6060
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/group-key-mgmt-server"
6161
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/time-synchronization-server"
62-
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/icd-management-server"
63-
PRIV_REQUIRES chip QRCode bt app_update driver nvs_flash spi_flash)
62+
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/icd-management-server")
63+
6464
get_filename_component(CHIP_ROOT ${CMAKE_SOURCE_DIR}/third_party/connectedhomeip REALPATH)
6565

6666
include("${CHIP_ROOT}/build/chip/esp32/esp32_codegen.cmake")

examples/lighting-app/esp32/main/CMakeLists.txt

+1-9
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,6 @@ set(SRC_DIRS_LIST
6767
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/scenes-server"
6868
)
6969

70-
set(PRIV_REQUIRES_LIST chip QRCode bt led_strip app_update openthread driver nvs_flash spi_flash)
71-
72-
if(${IDF_TARGET} STREQUAL "esp32")
73-
list(APPEND PRIV_REQUIRES_LIST spidriver screen-framework)
74-
endif()
75-
76-
7770
if (CONFIG_ENABLE_PW_RPC)
7871
# Append additional directories for RPC build
7972
set(PRIV_INCLUDE_DIRS_LIST "${PRIV_INCLUDE_DIRS_LIST}"
@@ -98,8 +91,7 @@ set(SRC_DIRS_LIST "${SRC_DIRS_LIST}"
9891
endif (CONFIG_ENABLE_PW_RPC)
9992

10093
idf_component_register(PRIV_INCLUDE_DIRS ${PRIV_INCLUDE_DIRS_LIST}
101-
SRC_DIRS ${SRC_DIRS_LIST}
102-
PRIV_REQUIRES ${PRIV_REQUIRES_LIST})
94+
SRC_DIRS ${SRC_DIRS_LIST})
10395
get_filename_component(CHIP_ROOT ${CMAKE_SOURCE_DIR}/third_party/connectedhomeip REALPATH)
10496

10597
include("${CHIP_ROOT}/build/chip/esp32/esp32_codegen.cmake")

examples/lock-app/esp32/main/CMakeLists.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ idf_component_register(INCLUDE_DIRS
7474
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/door-lock-server"
7575
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/identify-server"
7676
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/groups-server"
77-
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/icd-management-server"
78-
PRIV_REQUIRES bt chip QRCode nvs_flash driver)
77+
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/icd-management-server")
78+
7979
add_dependencies(${COMPONENT_LIB} app-codegen)
8080

8181
set(PIGWEED_ROOT "${CHIP_ROOT}/third_party/pigweed/repo")

examples/ota-provider-app/esp32/main/CMakeLists.txt

+1-2
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,7 @@ idf_component_register(PRIV_INCLUDE_DIRS
5353
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/common"
5454
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/providers"
5555
EXCLUDE_SRCS
56-
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/ota-provider-app/ota-provider-common/BdxOtaSender.cpp"
57-
PRIV_REQUIRES chip QRCode bt console spiffs spi_flash nvs_flash)
56+
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/ota-provider-app/ota-provider-common/BdxOtaSender.cpp")
5857

5958
get_filename_component(CHIP_ROOT ${CMAKE_SOURCE_DIR}/third_party/connectedhomeip REALPATH)
6059
include("${CHIP_ROOT}/build/chip/esp32/esp32_codegen.cmake")

examples/ota-requestor-app/esp32/main/CMakeLists.txt

+1-4
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,6 @@ set(SRC_DIRS_LIST
6262
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/providers"
6363
)
6464

65-
set(PRIV_REQUIRES_LIST chip QRCode bt console app_update nvs_flash)
66-
6765
if (CONFIG_ENABLE_PW_RPC)
6866
# Append additional directories for RPC build
6967
set(PRIV_INCLUDE_DIRS_LIST "${PRIV_INCLUDE_DIRS_LIST}"
@@ -88,8 +86,7 @@ set(SRC_DIRS_LIST "${SRC_DIRS_LIST}"
8886
endif (CONFIG_ENABLE_PW_RPC)
8987

9088
idf_component_register(PRIV_INCLUDE_DIRS ${PRIV_INCLUDE_DIRS_LIST}
91-
SRC_DIRS ${SRC_DIRS_LIST}
92-
PRIV_REQUIRES ${PRIV_REQUIRES_LIST})
89+
SRC_DIRS ${SRC_DIRS_LIST})
9390

9491
include("${CHIP_ROOT}/build/chip/esp32/esp32_codegen.cmake")
9592
chip_app_component_codegen("${CHIP_ROOT}/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.matter")

examples/persistent-storage/esp32/main/CMakeLists.txt

+1-2
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ idf_component_register(PRIV_INCLUDE_DIRS
2020
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/persistent-storage"
2121
SRC_DIRS
2222
"${CMAKE_CURRENT_LIST_DIR}"
23-
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/persistent-storage"
24-
PRIV_REQUIRES chip nvs_flash)
23+
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/persistent-storage")
2524

2625
set_property(TARGET ${COMPONENT_LIB} PROPERTY CXX_STANDARD 17)
2726
target_compile_options(${COMPONENT_LIB} PRIVATE "-DCHIP_HAVE_CONFIG_H")

examples/pigweed-app/esp32/main/CMakeLists.txt

+1-2
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@ idf_component_register(INCLUDE_DIRS
3333
"${CMAKE_CURRENT_LIST_DIR}"
3434
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32"
3535
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/common/pigweed"
36-
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/common/pigweed/esp32"
37-
PRIV_REQUIRES bt chip)
36+
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/common/pigweed/esp32")
3837

3938
get_filename_component(CHIP_ROOT ${CMAKE_SOURCE_DIR}/third_party/connectedhomeip REALPATH)
4039
set(PIGWEED_ROOT "${CHIP_ROOT}/third_party/pigweed/repo")

examples/shell/esp32/main/CMakeLists.txt

+1-2
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,4 @@ set(CHIP_SHELL_DIR "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/she
2222
idf_component_register(SRCS main.cpp
2323
"${CHIP_SHELL_DIR}/shell_common/globals.cpp"
2424
PRIV_INCLUDE_DIRS
25-
"${CHIP_SHELL_DIR}/shell_common/include"
26-
PRIV_REQUIRES chip nvs_flash bt)
25+
"${CHIP_SHELL_DIR}/shell_common/include")

examples/temperature-measurement-app/esp32/main/CMakeLists.txt

-3
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,6 @@ set(SRC_DIRS_LIST
5555
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/providers"
5656
)
5757

58-
set(PRIV_REQUIRES_LIST chip QRCode bt nvs_flash espcoredump)
59-
6058
if (CONFIG_ENABLE_PW_RPC)
6159
# Append additional directories for RPC build
6260
set(PRIV_INCLUDE_DIRS_LIST "${PRIV_INCLUDE_DIRS_LIST}"
@@ -82,7 +80,6 @@ endif (CONFIG_ENABLE_PW_RPC)
8280

8381
idf_component_register(PRIV_INCLUDE_DIRS ${PRIV_INCLUDE_DIRS_LIST}
8482
SRC_DIRS ${SRC_DIRS_LIST}
85-
PRIV_REQUIRES ${PRIV_REQUIRES_LIST}
8683
EMBED_FILES diagnostic_logs/end_user_support.log diagnostic_logs/network_diag.log)
8784

8885
include("${CHIP_ROOT}/build/chip/esp32/esp32_codegen.cmake")

0 commit comments

Comments
 (0)