mirror of
https://github.com/espressif/esp-protocols.git
synced 2025-11-16 15:29:25 +01:00
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
This commit is contained in:
@@ -11,7 +11,7 @@ endif()
|
||||
if(${IDF_TARGET} STREQUAL "linux")
|
||||
idf_component_register(SRCS "esp_websocket_client.c"
|
||||
INCLUDE_DIRS "include"
|
||||
REQUIRES esp-tls tcp_transport http_parser esp_event nvs_flash esp_stubs json
|
||||
REQUIRES esp-tls tcp_transport http_parser esp_event
|
||||
PRIV_REQUIRES esp_timer)
|
||||
else()
|
||||
idf_component_register(SRCS "esp_websocket_client.c"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
idf_component_register(SRCS "websocket_linux.c"
|
||||
REQUIRES esp_websocket_client protocol_examples_common)
|
||||
REQUIRES esp_websocket_client protocol_examples_common esp_netif)
|
||||
|
||||
if(CONFIG_GCOV_ENABLED)
|
||||
target_compile_options(${COMPONENT_LIB} PUBLIC --coverage -fprofile-arcs -ftest-coverage)
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
#include <esp_log.h>
|
||||
#include "nvs_flash.h"
|
||||
#include "protocol_examples_common.h"
|
||||
|
||||
#include "esp_websocket_client.h"
|
||||
@@ -160,7 +159,6 @@ int main(void)
|
||||
esp_log_level_set("transport_ws", ESP_LOG_DEBUG);
|
||||
esp_log_level_set("trans_tcp", ESP_LOG_DEBUG);
|
||||
|
||||
ESP_ERROR_CHECK(nvs_flash_init());
|
||||
ESP_ERROR_CHECK(esp_netif_init());
|
||||
ESP_ERROR_CHECK(esp_event_loop_create_default());
|
||||
|
||||
|
||||
@@ -4,5 +4,7 @@ dependencies:
|
||||
espressif/esp_websocket_client:
|
||||
version: "^1.0.0"
|
||||
override_path: "../../../"
|
||||
espressif/cjson:
|
||||
version: "^1.7.15"
|
||||
protocol_examples_common:
|
||||
path: ${IDF_PATH}/examples/common_components/protocol_examples_common
|
||||
|
||||
Reference in New Issue
Block a user