diff options
author | Martin Braun <martin.braun@ettus.com> | 2016-09-02 11:31:58 -0700 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2016-09-02 11:31:58 -0700 |
commit | 94385e3e953c380227796ae9ae647ff8c4bd9497 (patch) | |
tree | 296e2ee10d0e8a5e8a368a456815959c39f483f1 /tools/dissectors/cmake/Modules/FindWireshark.cmake | |
parent | 3e3524294629f3ad3c1ca0c0011aeadceab90120 (diff) | |
parent | 670eeda6e4c9ff2ab81f4e387bce49ea4dc79dcc (diff) | |
download | uhd-94385e3e953c380227796ae9ae647ff8c4bd9497.tar.gz uhd-94385e3e953c380227796ae9ae647ff8c4bd9497.tar.bz2 uhd-94385e3e953c380227796ae9ae647ff8c4bd9497.zip |
Merge branch 'maint'
Diffstat (limited to 'tools/dissectors/cmake/Modules/FindWireshark.cmake')
-rw-r--r-- | tools/dissectors/cmake/Modules/FindWireshark.cmake | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/tools/dissectors/cmake/Modules/FindWireshark.cmake b/tools/dissectors/cmake/Modules/FindWireshark.cmake new file mode 100644 index 000000000..276201245 --- /dev/null +++ b/tools/dissectors/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 ) + |