File: FindWireshark.cmake

package info (click to toggle)
libbtbb 2015.09.R2-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 1,396 kB
  • ctags: 2,047
  • sloc: ansic: 9,645; python: 922; sh: 170; makefile: 143; ruby: 21
file content (28 lines) | stat: -rw-r--r-- 1,060 bytes parent folder | download | duplicates (19)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#
# Try to find the wireshark library and its includes
#
# This snippet sets the following variables:
#  WIRESHARK_FOUND             True if wireshark library got found
#  WIRESHARK_INCLUDE_DIRS      Location of the wireshark headers 
#  WIRESHARK_LIBRARIES         List of libraries to use wireshark
#
#  Copyright (c) 2011 Reinhold Kainhofer <reinhold@kainhofer.com>
#
#  Redistribution and use is allowed according to the terms of the New
#  BSD license.
#  For details see the accompanying COPYING-CMAKE-SCRIPTS file.
#

# wireshark does not install its library with pkg-config information,
# so we need to manually find the libraries and headers

FIND_PATH( WIRESHARK_INCLUDE_DIRS epan/packet.h PATH_SUFFIXES wireshark )
FIND_LIBRARY( WIRESHARK_LIBRARIES wireshark )

# Report results
IF ( WIRESHARK_LIBRARIES AND WIRESHARK_INCLUDE_DIRS )
  SET( WIRESHARK_FOUND 1 )
ELSE ( WIRESHARK_LIBRARIES AND WIRESHARK_INCLUDE_DIRS )
  MESSAGE( SEND_ERROR "Could NOT find the wireshark library and headers" )
ENDIF ( WIRESHARK_LIBRARIES AND WIRESHARK_INCLUDE_DIRS )