8eb537d9c78ccd4b481a7c94ad5359f833c37856
[obnox/wireshark/wip.git] / cmake / modules / FindPcap.cmake
1 # - Find pcap
2 # Find the PCAP includes and library
3 #
4 #  PCAP_INCLUDE_DIR - where to find pcap.h, etc.
5 #  PCAP_LIBRARIES   - List of libraries when using pcap.
6 #  PCAP_FOUND       - True if pcap found.
7
8 FIND_PATH(PCAP_INCLUDE_DIR pcap.h
9   /usr/local/include
10   /usr/include
11 )
12
13 FIND_LIBRARY(PCAP_LIBRARIES
14   NAMES pcap
15   PATHS /usr/lib /usr/local/lib
16 )
17
18 IF(PCAP_INCLUDE_DIR)
19   IF(PCAP_LIBRARIES)
20     SET( PCAP_FOUND "YES" )
21   ENDIF(PCAP_LIBRARIES)
22 ENDIF(PCAP_INCLUDE_DIR)
23
24 MARK_AS_ADVANCED(
25   PCAP_LIBRARIES
26   PCAP_INCLUDE_DIR
27 )