Fixed issues on FreeBSD with CMake build for BSC and IPv6 datalinks. (#1046)
This commit is contained in:
+31
-1
@@ -847,10 +847,40 @@ elseif(${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD")
|
|||||||
|
|
||||||
target_sources(${PROJECT_NAME} PRIVATE
|
target_sources(${PROJECT_NAME} PRIVATE
|
||||||
ports/bsd/bacport.h
|
ports/bsd/bacport.h
|
||||||
ports/bsd/bip-init.c
|
$<$<BOOL:${BACDL_BIP}>:ports/bsd/bip-init.c>
|
||||||
|
$<$<BOOL:${BACDL_BIP6}>:ports/bsd/bip6.c>
|
||||||
|
$<$<BOOL:${BACDL_MSTP}>:ports/bsd/rs485.c>
|
||||||
|
$<$<BOOL:${BACDL_MSTP}>:ports/bsd/rs485.h>
|
||||||
|
$<$<BOOL:${BACDL_MSTP}>:ports/bsd/dlmstp.c>
|
||||||
ports/bsd/datetime-init.c
|
ports/bsd/datetime-init.c
|
||||||
ports/bsd/mstimer-init.c
|
ports/bsd/mstimer-init.c
|
||||||
|
$<$<BOOL:${BACDL_BSC}>:ports/bsd/bsc-event.c>
|
||||||
|
$<$<BOOL:${BACDL_BSC}>:ports/bsd/websocket-cli.c>
|
||||||
|
$<$<BOOL:${BACDL_BSC}>:ports/bsd/websocket-srv.c>
|
||||||
|
$<$<BOOL:${BACDL_BSC}>:ports/bsd/websocket-global.c>
|
||||||
ports/bsd/stdbool.h)
|
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()
|
endif()
|
||||||
|
|
||||||
target_include_directories(${PROJECT_NAME} PUBLIC
|
target_include_directories(${PROJECT_NAME} PUBLIC
|
||||||
|
|||||||
+1
-1
@@ -22,7 +22,7 @@
|
|||||||
#endif
|
#endif
|
||||||
#include "bacport.h"
|
#include "bacport.h"
|
||||||
|
|
||||||
#if defined(__APPLE__) || defined(__darwin__)
|
#if defined(__APPLE__) || defined(__darwin__) || defined(__FreeBSD__)
|
||||||
/* OSX seems not to define these. */
|
/* OSX seems not to define these. */
|
||||||
#ifndef s6_addr16
|
#ifndef s6_addr16
|
||||||
#define s6_addr16 __u6_addr.__u6_addr16
|
#define s6_addr16 __u6_addr.__u6_addr16
|
||||||
|
|||||||
Reference in New Issue
Block a user