X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/d33ba72b2d6eb207e62017cb3c1dfb8618d84f98..0e15d065d56be3dcaee6fb95be38d69559338b21:/cmake/Modules/FindPCAP.cmake diff --git a/cmake/Modules/FindPCAP.cmake b/cmake/Modules/FindPCAP.cmake index 855db651..64d0901d 100644 --- a/cmake/Modules/FindPCAP.cmake +++ b/cmake/Modules/FindPCAP.cmake @@ -1,6 +1,12 @@ # # Try to find libpcap. # +# To tell this module where to look, a user may set the environment variable +# PCAP_ROOT to point cmake to the *root* of a directory with include and +# lib subdirectories for pcap.dll (e.g WpdPack or npcap-sdk). +# Alternatively, PCAP_ROOT may also be set from cmake command line or GUI +# (e.g cmake -DPCAP_ROOT=C:\path\to\pcap [...]) +# if(WIN32) # @@ -67,7 +73,7 @@ else(WIN32) # libpcap isn't available - not all systems ship pkg-config, and # libpcap didn't have .pc files until libpcap 1.9.0. # - if(PCAP_FIND_QUIET) + if(PCAP_FIND_QUIETLY) set(_quiet "QUIET") endif() @@ -75,7 +81,7 @@ else(WIN32) # First, try pkg-config. # find_package(PkgConfig) - pkg_search_module(CONFIG_PCAP ${QUIET} libpcap) + pkg_search_module(CONFIG_PCAP ${_quiet} libpcap) if(NOT CONFIG_PCAP_FOUND) # @@ -85,6 +91,11 @@ else(WIN32) if(PCAP_CONFIG) # # We have pcap-config; use it. + # + if(NOT "${_quiet}" STREQUAL "QUIET") + message(STATUS "Found pcap-config") + endif() + # # if this is macOS or some other Darwin-based OS, check whether # it's the system-supplied one. @@ -130,7 +141,7 @@ else(WIN32) endif() endif() endforeach() - + # # Now, get the library directories and libraries for dynamic linking. #