2023-01-31 02:29:00 -05:00
|
|
|
idf_build_get_property(target IDF_TARGET)
|
|
|
|
|
|
|
|
if(${target} STREQUAL "linux")
|
|
|
|
# Header only library for linux
|
|
|
|
|
|
|
|
idf_component_register(INCLUDE_DIRS include
|
2023-02-12 23:53:16 -05:00
|
|
|
SRCS protocol_examples_utils.c)
|
2023-01-31 02:29:00 -05:00
|
|
|
return()
|
|
|
|
endif()
|
|
|
|
|
2022-07-03 03:24:39 -04:00
|
|
|
set(srcs "stdin_out.c"
|
|
|
|
"addr_from_stdin.c"
|
|
|
|
"connect.c"
|
2023-01-25 06:15:01 -05:00
|
|
|
"wifi_connect.c"
|
|
|
|
"protocol_examples_utils.c")
|
2022-07-03 03:24:39 -04:00
|
|
|
|
|
|
|
if(CONFIG_EXAMPLE_PROVIDE_WIFI_CONSOLE_CMD)
|
|
|
|
list(APPEND srcs "console_cmd.c")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(CONFIG_EXAMPLE_CONNECT_ETHERNET)
|
|
|
|
list(APPEND srcs "eth_connect.c")
|
|
|
|
endif()
|
|
|
|
|
2023-10-04 11:35:57 -04:00
|
|
|
if(CONFIG_EXAMPLE_CONNECT_PPP)
|
|
|
|
list(APPEND srcs "ppp_connect.c")
|
|
|
|
endif()
|
|
|
|
|
2022-07-03 03:24:39 -04:00
|
|
|
|
|
|
|
idf_component_register(SRCS "${srcs}"
|
|
|
|
INCLUDE_DIRS "include"
|
2022-05-11 10:01:48 -04:00
|
|
|
PRIV_REQUIRES esp_netif driver esp_wifi vfs)
|
2022-07-03 03:24:39 -04:00
|
|
|
|
|
|
|
if(CONFIG_EXAMPLE_PROVIDE_WIFI_CONSOLE_CMD)
|
|
|
|
idf_component_optional_requires(PRIVATE console)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(CONFIG_EXAMPLE_CONNECT_ETHERNET)
|
|
|
|
idf_component_optional_requires(PRIVATE esp_eth)
|
|
|
|
endif()
|
2023-10-04 11:35:57 -04:00
|
|
|
|
|
|
|
if(CONFIG_EXAMPLE_CONNECT_PPP)
|
|
|
|
idf_component_optional_requires(PRIVATE esp_tinyusb espressif__esp_tinyusb)
|
|
|
|
endif()
|