]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Add a message for pcap-config, and suppress messages with QUIET.
authorGuy Harris <[email protected]>
Tue, 30 Apr 2019 01:41:20 +0000 (18:41 -0700)
committerGuy Harris <[email protected]>
Tue, 30 Apr 2019 01:41:20 +0000 (18:41 -0700)
We have messages for pkg-config and for the old-fashioned search; print
a message if pkg-config failed but we found pcap-config.

Fix the suppression of messages with a QUIET argument.

cmake/Modules/FindPCAP.cmake

index 855db6517d973b310a1adab2db6ab50da55f6214..35b9244fe8ab342e7274903035f5bac05bd05b47 100644 (file)
@@ -67,7 +67,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 +75,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 +85,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.