1if (NOT (FREERTOS_PLUS_TCP_NETWORK_IF STREQUAL "POSIX") ) 2 return() 3endif() 4 5find_package(PCAP REQUIRED) 6set(THREADS_PREFER_PTHREAD_FLAG TRUE) 7find_package(Threads) 8 9#------------------------------------------------------------------------------ 10add_library( freertos_plus_tcp_network_if STATIC ) 11 12target_sources( freertos_plus_tcp_network_if 13 PRIVATE 14 NetworkInterface.c 15) 16 17target_compile_options( freertos_plus_tcp_network_if 18 PRIVATE 19 $<$<COMPILE_LANG_AND_ID:C,Clang>:-Wno-cast-align> 20 $<$<COMPILE_LANG_AND_ID:C,Clang>:-Wno-declaration-after-statement> 21 $<$<COMPILE_LANG_AND_ID:C,Clang>:-Wno-documentation> 22 $<$<COMPILE_LANG_AND_ID:C,Clang>:-Wno-missing-noreturn> 23 $<$<COMPILE_LANG_AND_ID:C,Clang,GNU>:-Wno-padded> 24 $<$<COMPILE_LANG_AND_ID:C,Clang>:-Wno-shorten-64-to-32> 25 $<$<COMPILE_LANG_AND_ID:C,Clang>:-Wno-undef> 26 $<$<COMPILE_LANG_AND_ID:C,Clang>:-Wno-unused-macros> 27 $<$<COMPILE_LANG_AND_ID:C,GNU>:-Wno-unused-parameter> 28) 29 30target_link_libraries( freertos_plus_tcp_network_if 31 PUBLIC 32 freertos_plus_tcp_port 33 freertos_plus_tcp_network_if_common 34 PRIVATE 35 freertos_kernel 36 freertos_plus_tcp 37 ${PCAP_LIBRARY} 38 Threads::Threads 39) 40