xref: /FreeRTOS-Plus-TCP-v4.0.0/source/portable/NetworkInterface/xilinx_ultrascale/CMakeLists.txt (revision 89269454b9187e8693e94eb3f6cb0df5da9ee4c3)
1if (NOT (FREERTOS_PLUS_TCP_NETWORK_IF STREQUAL "XILINX_ULTRASCALE") )
2    return()
3endif()
4
5if(NOT TARGET xil_bsp)
6    message(FATAL_ERROR "For FREERTOS_PLUS_TCP_NETWORK_IF=XILINX_ULTRASCALE must have a target for the xil_bsp")
7endif()
8
9# XILINX_ULTRASCALE port shares uncached_memory.c and .h with FreeRTOS-Plus-FAT.
10# Separating out so it can potentially be included there as well.
11#------------------------------------------------------------------------------
12add_library(freertos_xil_uncached_memory STATIC)
13
14target_sources(freertos_xil_uncached_memory
15  PRIVATE
16    uncached_memory.c
17    uncached_memory.h
18)
19
20target_include_directories(freertos_xil_uncached_memory
21  PUBLIC
22    .
23  PRIVATE
24    ..
25)
26
27target_link_libraries(freertos_xil_uncached_memory
28  PRIVATE
29    freertos_kernel
30    freertos_plus_tcp
31    freertos_plus_tcp_network_if
32    xil_bsp
33)
34
35#------------------------------------------------------------------------------
36add_library( freertos_plus_tcp_network_if STATIC )
37
38target_sources( freertos_plus_tcp_network_if
39  PRIVATE
40    NetworkInterface.c
41    x_emacpsif_dma.c
42    x_emacpsif_hw.c
43    x_emacpsif_hw.h
44    x_emacpsif_physpeed.c
45    x_emacpsif.h
46    x_topology.h
47)
48
49target_include_directories( freertos_plus_tcp_network_if
50  PRIVATE
51    ..
52)
53
54target_compile_options( freertos_plus_tcp_network_if
55  PRIVATE
56    $<$<COMPILE_LANG_AND_ID:C,Clang>:-Wno-cast-align>
57    $<$<COMPILE_LANG_AND_ID:C,Clang>:-Wno-declaration-after-statement>
58    $<$<COMPILE_LANG_AND_ID:C,Clang,GNU>:-Wno-padded>
59)
60
61target_link_libraries( freertos_plus_tcp_network_if
62  PUBLIC
63    freertos_plus_tcp_port
64    freertos_plus_tcp_network_if_common
65  PRIVATE
66    freertos_kernel
67    freertos_plus_tcp
68    freertos_xil_uncached_memory
69    xil_bsp
70)
71