2021-04-16 05:23:18 -04:00
|
|
|
set(srcs
|
|
|
|
"transport.c"
|
|
|
|
"transport_ssl.c"
|
2022-04-21 11:41:58 -04:00
|
|
|
"transport_internal.c")
|
2021-04-16 05:23:18 -04:00
|
|
|
|
2022-10-05 09:20:39 -04:00
|
|
|
if(CONFIG_LWIP_IPV4)
|
|
|
|
list(APPEND srcs
|
|
|
|
"transport_socks_proxy.c")
|
|
|
|
endif()
|
|
|
|
|
2021-04-16 05:23:18 -04:00
|
|
|
if(CONFIG_WS_TRANSPORT)
|
|
|
|
list(APPEND srcs
|
|
|
|
"transport_ws.c")
|
|
|
|
endif()
|
|
|
|
|
2022-11-08 03:54:17 -05:00
|
|
|
set(req esp-tls)
|
|
|
|
if(NOT ${IDF_TARGET} STREQUAL "linux")
|
2022-10-05 09:20:39 -04:00
|
|
|
list(APPEND req lwip esp_timer)
|
2022-11-08 03:54:17 -05:00
|
|
|
endif()
|
|
|
|
|
2021-04-16 05:23:18 -04:00
|
|
|
idf_component_register(SRCS "${srcs}"
|
2019-04-16 05:58:38 -04:00
|
|
|
INCLUDE_DIRS "include"
|
2019-08-05 23:00:37 -04:00
|
|
|
PRIV_INCLUDE_DIRS "private_include"
|
2022-11-08 03:54:17 -05:00
|
|
|
REQUIRES ${req})
|
2023-04-03 14:31:51 -04:00
|
|
|
|
|
|
|
if(${IDF_TARGET} STREQUAL "linux")
|
|
|
|
# Check if LWIP in the build for linux target to add esp_timer to the dependencies
|
|
|
|
# since socks_proxy transport needs it and lwip & linux build could use it
|
|
|
|
idf_build_get_property(build_components BUILD_COMPONENTS)
|
|
|
|
if("lwip" IN_LIST build_components)
|
|
|
|
idf_component_get_property(esp_timer esp_timer COMPONENT_LIB)
|
|
|
|
target_link_libraries(${COMPONENT_LIB} PUBLIC ${esp_timer})
|
|
|
|
endif()
|
|
|
|
endif()
|