--- CMakeLists.txt.orig 2025-06-23 23:19:03 UTC +++ CMakeLists.txt @@ -834,10 +834,40 @@ elseif(${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD") target_sources(${PROJECT_NAME} PRIVATE ports/bsd/bacport.h - ports/bsd/bip-init.c + $<$:ports/bsd/bip-init.c> + $<$:ports/bsd/bip6.c> + $<$:ports/bsd/rs485.c> + $<$:ports/bsd/rs485.h> + $<$:ports/bsd/dlmstp.c> ports/bsd/datetime-init.c ports/bsd/mstimer-init.c + $<$:ports/bsd/bsc-event.c> + $<$:ports/bsd/websocket-cli.c> + $<$:ports/bsd/websocket-srv.c> + $<$:ports/bsd/websocket-global.c> ports/bsd/stdbool.h) + + if(BACDL_ETHERNET) + FIND_PATH(PCAP_INCLUDE pcap.h) + if(NOT PCAP_INCLUDE) + message(WARNING "BACNET: pcap.h header file not found") + else() + message(STATUS "BACNET: pcap Include:...................\"${PCAP_INCLUDE}\"") + endif() + FIND_LIBRARY(PCAP_LIBRARIES NAMES pcap) + if(NOT PCAP_LIBRARIES) + message(WARNING "BACNET: libpcap not found") + else() + message(STATUS "BACNET: pcap Lib:.......................\"${PCAP_LIBRARIES}\"") + endif() + if(PCAP_INCLUDE AND PCAP_LIBRARIES) + include_directories(${PCAP_INCLUDE}) + link_libraries(${PCAP_LIBRARIES}) + target_sources(${PROJECT_NAME} PRIVATE + ports/bsd/ethernet.c + ) + endif() + endif() endif() target_include_directories(${PROJECT_NAME} PUBLIC