tcp_client example: support for Linux target.

This commit is contained in:
Abhik Roy
2022-07-23 00:01:50 +05:30
parent c917219c04
commit 933a2a69fe
15 changed files with 475 additions and 85 deletions

View File

@@ -1,2 +1,13 @@
idf_component_register(SRCS "tcp_client.c"
INCLUDE_DIRS ".")
if(${IDF_TARGET} STREQUAL "linux")
set(requires esp_stubs)
endif()
if("${CONFIG_EXAMPLE_IPV4}" STREQUAL y)
set(tcp_client_ip tcp_client_v4.c)
else()
set(tcp_client_ip tcp_client_v6.c)
endif()
idf_component_register(SRCS "tcp_client_main.c" "${tcp_client_ip}"
INCLUDE_DIRS "."
REQUIRES ${requires})