]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Set PCAP_INCLUDE_DIRS as well as PCAP_INCLUDE_DIR.
authorGuy Harris <[email protected]>
Sat, 27 Jan 2018 07:48:59 +0000 (23:48 -0800)
committerGuy Harris <[email protected]>
Sat, 27 Jan 2018 07:48:59 +0000 (23:48 -0800)
cmake/Modules/FindPCAP.cmake

index af7052656d01a899dc3750bcbaf9292b8f129f6b..63597a1e6839cfa4173634502f11e92000622d59 100644 (file)
@@ -14,7 +14,12 @@ if(PCAP_CONFIG)
   if(NOT PCAP_CONFIG_RESULT EQUAL 0)
     message(FATAL_ERROR "pcap-config --cflags failed")
   endif()
-  string(REGEX REPLACE "-I" "" PCAP_INCLUDE_DIR ${PCAP_CONFIG_OUTPUT})
+  #
+  # XXX - this assumes that there's only one -I flag in the output
+  # of pcap-config --cflags.  That *should* be the case.
+  #
+  string(REGEX REPLACE "-I" "" PCAP_INCLUDE_DIRS ${PCAP_CONFIG_OUTPUT})
+  set(PCAP_INCLUDE_DIR ${PCAP_INCLUDE_DIRS})
 
   # Now, get the libraries.
   execute_process(COMMAND "${PCAP_CONFIG}" "--libs"