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"