aboutsummaryrefslogtreecommitdiffstats
path: root/tools/octoclock-dissector/cmake/Modules/FindWireshark.cmake
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2016-06-06 16:51:53 -0700
committerMartin Braun <martin.braun@ettus.com>2016-06-06 16:51:53 -0700
commitc69222a15c36c7222805a9b64f786ee5d6fbfb3e (patch)
treee01b242f30ea297d6b14d2416226e5defd19f9ba /tools/octoclock-dissector/cmake/Modules/FindWireshark.cmake
parentb1c2d4bbb4e1ae3b085bb0ca84b2f53ce8bbd357 (diff)
parent2004bbdb0298d7a2ce9aa274e4a9bbdd22792567 (diff)
downloaduhd-c69222a15c36c7222805a9b64f786ee5d6fbfb3e.tar.gz
uhd-c69222a15c36c7222805a9b64f786ee5d6fbfb3e.tar.bz2
uhd-c69222a15c36c7222805a9b64f786ee5d6fbfb3e.zip
Merge branch 'maint'
Diffstat (limited to 'tools/octoclock-dissector/cmake/Modules/FindWireshark.cmake')
-rw-r--r--tools/octoclock-dissector/cmake/Modules/FindWireshark.cmake28
1 files changed, 28 insertions, 0 deletions
diff --git a/tools/octoclock-dissector/cmake/Modules/FindWireshark.cmake b/tools/octoclock-dissector/cmake/Modules/FindWireshark.cmake
new file mode 100644
index 000000000..276201245
--- /dev/null
+++ b/tools/octoclock-dissector/cmake/Modules/FindWireshark.cmake
@@ -0,0 +1,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/column.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 )
+