1idf_build_get_property(target IDF_TARGET)
2
3if(${target} STREQUAL "linux")
4    # Header only library for linux
5    idf_component_register(INCLUDE_DIRS include)
6    return()
7endif()
8
9set(srcs
10    "esp_netif_handlers.c"
11    "esp_netif_objects.c"
12    "esp_netif_defaults.c"
13    "lwip/esp_netif_lwip.c"
14    "lwip/esp_netif_lwip_defaults.c"
15    "lwip/esp_netif_sta_list.c")
16
17set(include_dirs "include")
18set(priv_include_dirs "lwip" "private_include")
19
20if(CONFIG_LWIP_SLIP_SUPPORT)
21list(APPEND srcs
22    "lwip/esp_netif_lwip_slip.c")
23endif()
24
25if(CONFIG_PPP_SUPPORT)
26list(APPEND srcs
27    "lwip/esp_netif_lwip_ppp.c")
28endif()
29
30if(CONFIG_LWIP_NETIF_LOOPBACK)
31list(APPEND srcs
32    "loopback/esp_netif_loopback.c")
33endif()
34
35idf_component_register(SRCS "${srcs}"
36                    INCLUDE_DIRS "${include_dirs}"
37                    PRIV_INCLUDE_DIRS "${priv_include_dirs}"
38                    REQUIRES lwip esp_eth tcpip_adapter)
39