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