1if(CONFIG_MDNS_NETWORKING_SOCKET)
2    set(MDNS_NETWORKING "mdns_networking_socket.c")
3else()
4    set(MDNS_NETWORKING "mdns_networking_lwip.c")
5endif()
6
7idf_build_get_property(target IDF_TARGET)
8if(${target} STREQUAL "linux")
9    set(dependencies esp_system_protocols_linux)
10    set(srcs "mdns.c" ${MDNS_NETWORKING})
11else()
12    set(dependencies lwip console esp_netif)
13    set(private_dependencies esp_timer)
14    set(srcs "mdns.c" ${MDNS_NETWORKING} "mdns_console.c")
15endif()
16
17idf_component_register(
18        SRCS ${srcs}
19        INCLUDE_DIRS "include"
20        PRIV_INCLUDE_DIRS "private_include"
21        REQUIRES ${dependencies}
22        PRIV_REQUIRES ${private_dependencies})
23