2023-06-13 13:23:24 +04:00
|
|
|
idf_build_get_property(target IDF_TARGET)
|
|
|
|
|
2021-04-16 17:23:18 +08:00
|
|
|
if(NOT CONFIG_WS_TRANSPORT AND NOT CMAKE_BUILD_EARLY_EXPANSION)
|
|
|
|
message(STATUS "Websocket transport is disabled so the esp_websocket_client component will not be built")
|
|
|
|
# note: the component is still included in the build so it can become visible again in config
|
|
|
|
# without needing to re-run CMake. However no source or header files are built.
|
|
|
|
idf_component_register()
|
|
|
|
return()
|
|
|
|
endif()
|
|
|
|
|
2023-06-13 13:23:24 +04:00
|
|
|
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
|
|
|
|
PRIV_REQUIRES esp_timer)
|
|
|
|
else()
|
|
|
|
idf_component_register(SRCS "esp_websocket_client.c"
|
2019-04-28 15:38:46 +08:00
|
|
|
INCLUDE_DIRS "include"
|
2021-12-31 13:50:55 +05:30
|
|
|
REQUIRES lwip esp-tls tcp_transport http_parser
|
2022-07-27 17:21:43 +04:00
|
|
|
PRIV_REQUIRES esp_timer esp_event)
|
2023-06-13 13:23:24 +04:00
|
|
|
endif()
|