]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Handle the output of pcap-config --cflags being empty.
authorGuy Harris <[email protected]>
Thu, 12 Jul 2018 17:29:49 +0000 (10:29 -0700)
committerGuy Harris <[email protected]>
Thu, 12 Jul 2018 17:30:10 +0000 (10:30 -0700)
Quote it in the string(REGEX REPLACE) call.

cmake/Modules/FindPCAP.cmake

index 078025af5eb3e4e87284ba90581595ac9899d95a..a021e29811a9bbca1ab9aca79b98236954722ee0 100644 (file)
@@ -24,7 +24,7 @@ if(PCAP_CONFIG)
   # 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})
+  string(REGEX REPLACE "-I" "" PCAP_INCLUDE_DIRS "${PCAP_CONFIG_OUTPUT}")
   set(PCAP_INCLUDE_DIR ${PCAP_INCLUDE_DIRS})
 
   # Now, get the libraries.