15 lines
386 B
CMake
15 lines
386 B
CMake
# Find libpcap
|
|
find_package(Pcap QUIET)
|
|
|
|
if(Pcap_FOUND)
|
|
message(STATUS "Found libpcap: ${Pcap_LIBRARIES} (found version \"${PCap_VERSION}\")")
|
|
return()
|
|
endif()
|
|
|
|
# If desired libpcap was not found, build from source
|
|
if(NOT LIBPCAP_VERSION)
|
|
set(LIBPCAP_VERSION "libpcap-1.10")
|
|
endif()
|
|
message(STATUS "Fetching and configuring libpcap version ${LIBPCAP_VERSION}")
|
|
include(FetchPcap)
|