Skip to content

Commit 69bd459

Browse files
committed
fix(websocket): clean up component dependencies
- Remove unused 'json', 'nvs_flash', 'esp_stubs', dependency from Linux build configuration - Add cJSON dependency to target example's idf_component.yml
1 parent 04bd30d commit 69bd459

File tree

3 files changed

+2
-4
lines changed

3 files changed

+2
-4
lines changed

components/esp_websocket_client/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ endif()
1111
if(${IDF_TARGET} STREQUAL "linux")
1212
idf_component_register(SRCS "esp_websocket_client.c"
1313
INCLUDE_DIRS "include"
14-
REQUIRES esp-tls tcp_transport http_parser esp_event nvs_flash esp_stubs json
14+
REQUIRES esp-tls tcp_transport http_parser esp_event
1515
PRIV_REQUIRES esp_timer)
1616
else()
1717
idf_component_register(SRCS "esp_websocket_client.c"

components/esp_websocket_client/examples/linux/main/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
idf_component_register(SRCS "websocket_linux.c"
2-
REQUIRES esp_websocket_client protocol_examples_common)
2+
REQUIRES esp_websocket_client protocol_examples_common esp_netif)
33

44
if(CONFIG_GCOV_ENABLED)
55
target_compile_options(${COMPONENT_LIB} PUBLIC --coverage -fprofile-arcs -ftest-coverage)

components/esp_websocket_client/examples/linux/main/websocket_linux.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
* SPDX-License-Identifier: Apache-2.0
55
*/
66
#include <esp_log.h>
7-
#include "nvs_flash.h"
87
#include "protocol_examples_common.h"
98

109
#include "esp_websocket_client.h"
@@ -160,7 +159,6 @@ int main(void)
160159
esp_log_level_set("transport_ws", ESP_LOG_DEBUG);
161160
esp_log_level_set("trans_tcp", ESP_LOG_DEBUG);
162161

163-
ESP_ERROR_CHECK(nvs_flash_init());
164162
ESP_ERROR_CHECK(esp_netif_init());
165163
ESP_ERROR_CHECK(esp_event_loop_create_default());
166164

0 commit comments

Comments
 (0)