Lwip build fixes (#1011)

Only build lwip acd.c if it exists (after 2.1.3)
Some mdns files only exist in 2.2.x

Fixes #1009
This commit is contained in:
Peter Harper 2022-10-16 22:38:42 +01:00 committed by GitHub
parent 6f1fc56833
commit c4f37b2e44
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -53,7 +53,6 @@ if (EXISTS ${PICO_LWIP_PATH}/${LWIP_TEST_PATH})
add_library(pico_lwip_core4 INTERFACE)
target_sources(pico_lwip_core4 INTERFACE
${PICO_LWIP_PATH}/src/core/ipv4/acd.c
${PICO_LWIP_PATH}/src/core/ipv4/autoip.c
${PICO_LWIP_PATH}/src/core/ipv4/dhcp.c
${PICO_LWIP_PATH}/src/core/ipv4/etharp.c
@ -64,6 +63,13 @@ if (EXISTS ${PICO_LWIP_PATH}/${LWIP_TEST_PATH})
${PICO_LWIP_PATH}/src/core/ipv4/ip4_addr.c
)
# Doesn't exists in version earlier than 2.1.3
if (EXISTS ${PICO_LWIP_PATH}/src/core/ipv4/acd.c)
target_sources(pico_lwip_core4 INTERFACE
${PICO_LWIP_PATH}/src/core/ipv4/acd.c
)
endif()
add_library(pico_lwip_core6 INTERFACE)
target_sources(pico_lwip_core6 INTERFACE
${PICO_LWIP_PATH}/src/core/ipv6/dhcp6.c
@ -207,10 +213,16 @@ if (EXISTS ${PICO_LWIP_PATH}/${LWIP_TEST_PATH})
add_library(pico_lwip_mdns INTERFACE)
target_sources(pico_lwip_mdns INTERFACE
${PICO_LWIP_PATH}/src/apps/mdns/mdns.c
${PICO_LWIP_PATH}/src/apps/mdns/mdns_out.c
${PICO_LWIP_PATH}/src/apps/mdns/mdns_domain.c
)
# Old versions of lwip had everything in mdns.c
if (EXISTS ${PICO_LWIP_PATH}/src/apps/mdns/mdns_out.c)
target_sources(pico_lwip_mdns INTERFACE
${PICO_LWIP_PATH}/src/apps/mdns/mdns_out.c
${PICO_LWIP_PATH}/src/apps/mdns/mdns_domain.c
)
endif()
# NetBIOS name server
add_library(pico_lwip_netbios INTERFACE)
target_sources(pico_lwip_netbios INTERFACE