add ether support for mac os x (#775)
Depends on pcap (e.g. with Wireshark) build with #cmake .. -G"CodeBlocks - Unix Makefiles" -DBACDL_ETHERNET=ON -DBACDL_BIP=OFF -DBAC_ROUTING=OFF run as normal user (not root) like Wireshark
This commit is contained in:
@@ -681,6 +681,28 @@ elseif(APPLE)
|
||||
ports/bsd/datetime-init.c
|
||||
ports/bsd/mstimer-init.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()
|
||||
elseif(${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD")
|
||||
message(STATUS "BACNET: building for FreeBSD")
|
||||
set(BACNET_PORT_DIRECTORY_PATH ${CMAKE_CURRENT_LIST_DIR}/ports/bsd)
|
||||
|
||||
Reference in New Issue
Block a user