1# 2# Try to find the wireshark library and its includes 3# 4# This snippet sets the following variables: 5# WIRESHARK_FOUND True if wireshark library got found 6# WIRESHARK_INCLUDE_DIRS Location of the wireshark headers 7# WIRESHARK_LIBRARIES List of libraries to use wireshark 8# 9# Copyright (c) 2011 Reinhold Kainhofer <[email protected]> 10# 11# Redistribution and use is allowed according to the terms of the New 12# BSD license. 13# For details see the accompanying COPYING-CMAKE-SCRIPTS file. 14# 15 16# wireshark does not install its library with pkg-config information, 17# so we need to manually find the libraries and headers 18 19FIND_PATH( WIRESHARK_INCLUDE_DIRS epan/packet.h PATH_SUFFIXES wireshark ) 20FIND_LIBRARY( WIRESHARK_LIBRARIES wireshark ) 21 22# Report results 23IF ( WIRESHARK_LIBRARIES AND WIRESHARK_INCLUDE_DIRS ) 24 SET( WIRESHARK_FOUND 1 ) 25ELSE ( WIRESHARK_LIBRARIES AND WIRESHARK_INCLUDE_DIRS ) 26 MESSAGE( SEND_ERROR "Could NOT find the wireshark library and headers" ) 27ENDIF ( WIRESHARK_LIBRARIES AND WIRESHARK_INCLUDE_DIRS ) 28 29