source: azure_iot_hub_f767zi/trunk/asp_baseplatform/lwip/contrib-2.1.0/ports/unix/Filelists.cmake@ 457

Last change on this file since 457 was 457, checked in by coas-nagasima, 4 years ago

ファイルを追加

File size: 1.7 KB
Line 
1# This file is indended to be included in end-user CMakeLists.txt
2# include(/path/to/Filelists.cmake)
3# It assumes the variable LWIP_CONTRIB_DIR is defined pointing to the
4# root path of lwIP contrib sources.
5#
6# This file is NOT designed (on purpose) to be used as cmake
7# subdir via add_subdirectory()
8# The intention is to provide greater flexibility to users to
9# create their own targets using the *_SRCS variables.
10
11set(lwipcontribportunix_SRCS
12 ${LWIP_CONTRIB_DIR}/ports/unix/port/sys_arch.c
13 ${LWIP_CONTRIB_DIR}/ports/unix/port/perf.c
14)
15
16set(lwipcontribportunixnetifs_SRCS
17 ${LWIP_CONTRIB_DIR}/ports/unix/port/netif/tapif.c
18 ${LWIP_CONTRIB_DIR}/ports/unix/port/netif/list.c
19 ${LWIP_CONTRIB_DIR}/ports/unix/port/netif/sio.c
20 ${LWIP_CONTRIB_DIR}/ports/unix/port/netif/fifo.c
21)
22
23add_library(lwipcontribportunix EXCLUDE_FROM_ALL ${lwipcontribportunix_SRCS} ${lwipcontribportunixnetifs_SRCS})
24target_include_directories(lwipcontribportunix PRIVATE ${LWIP_INCLUDE_DIRS} ${LWIP_MBEDTLS_INCLUDE_DIRS})
25target_compile_options(lwipcontribportunix PRIVATE ${LWIP_COMPILER_FLAGS})
26target_compile_definitions(lwipcontribportunix PRIVATE ${LWIP_DEFINITIONS} ${LWIP_MBEDTLS_DEFINITIONS})
27target_link_libraries(lwipcontribportunix PUBLIC ${LWIP_MBEDTLS_LINK_LIBRARIES})
28
29if (CMAKE_SYSTEM_NAME STREQUAL Linux)
30 find_library(LIBUTIL util)
31 find_library(LIBPTHREAD pthread)
32 find_library(LIBRT rt)
33 target_link_libraries(lwipcontribportunix PUBLIC ${LIBUTIL} ${LIBPTHREAD} ${LIBRT})
34endif()
35
36if (CMAKE_SYSTEM_NAME STREQUAL Darwin)
37 # Darwin doesn't have pthreads or POSIX real-time extensions libs
38 find_library(LIBUTIL util)
39 target_link_libraries(lwipcontribportunix PUBLIC ${LIBUTIL})
40endif()
Note: See TracBrowser for help on using the repository browser.