stm32_serDes_protobuf_project/bsp/CMakeLists.txt

49 lines
1.4 KiB
CMake
Raw Normal View History

2024-05-02 17:19:55 +03:00
set(LWIP_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/lwip/src)
2024-04-30 13:10:11 +03:00
set(LWIP_INCLUDES ${CMAKE_CURRENT_SOURCE_DIR}/lwip/src/include)
set(LWIP_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/lwip/src/core)
2024-04-08 14:21:04 +03:00
2024-05-02 17:19:55 +03:00
file(GLOB_RECURSE LWIP_SOURCES
${LWIP_SOURCE_DIR}/core/*.c
${LWIP_SOURCE_DIR}/netif/*.c
)
2024-04-08 14:21:04 +03:00
2024-04-30 13:10:11 +03:00
add_library(bsp STATIC
2024-04-08 14:21:04 +03:00
bsp.c
2024-05-02 17:19:55 +03:00
lwip/lwip.c
lwip/ethernetif.c
lwip/stm32f4_eth_periph/src/stm32f4xx_hal_eth.c
${LWIP_SOURCE_DIR}/api/err.c
${LWIP_SOURCE_DIR}/core/def.c
${LWIP_SOURCE_DIR}/core/init.c
${LWIP_SOURCE_DIR}/core/ip.c
${LWIP_SOURCE_DIR}/core/mem.c
${LWIP_SOURCE_DIR}/core/memp.c
${LWIP_SOURCE_DIR}/core/netif.c
${LWIP_SOURCE_DIR}/core/pbuf.c
${LWIP_SOURCE_DIR}/core/timeouts.c
${LWIP_SOURCE_DIR}/core/udp.c
${LWIP_SOURCE_DIR}/core/ipv4/dhcp.c
${LWIP_SOURCE_DIR}/core/ipv4/etharp.c
${LWIP_SOURCE_DIR}/core/ipv4/icmp.c
${LWIP_SOURCE_DIR}/core/ipv4/ip4.c
${LWIP_SOURCE_DIR}/core/ipv4/ip4_addr.c
${LWIP_SOURCE_DIR}/core/ipv4/ip4_frag.c
${LWIP_SOURCE_DIR}/netif/ethernet.c
2024-04-08 14:21:04 +03:00
)
2024-04-30 13:10:11 +03:00
target_include_directories(bsp PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}
2024-05-02 17:19:55 +03:00
${CMAKE_SOURCE_DIR}/bsp/lwip
${CMAKE_SOURCE_DIR}/bsp/lwip/system
${LWIP_INCLUDES}
${LWIP_INCLUDES}/lwip
${LWIP_INCLUDES}/netif
${LWIP_INCLUDES}/stm32f4_eth_periph/inc
2024-04-08 14:21:04 +03:00
)
2024-04-30 13:10:11 +03:00
target_link_libraries(bsp PUBLIC
stm32f4xx
2024-04-08 14:21:04 +03:00
)
2024-04-30 13:10:11 +03:00
target_compile_definitions(bsp PUBLIC STM32F439xx)