aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaarten Bezemer <maarten.bezemer@gmail.com>2014-11-12 12:56:26 +0100
committerMichael Mann <mmann78@netscape.net>2014-12-16 16:04:55 +0000
commit972d34794437973499fd26be8acb26760dde42dc (patch)
tree4ffc6d62e76efc07cae36d3e2a44fff7fea957d5
parent6ee78f3be167807b9e2790b8f88f14ea1a4c9462 (diff)
Add Wireshark_LIBRARY variable
This variable can be used to obtain the wireshark library(ies) (from the correct location). Change-Id: I90cd5b098eb746ac573a2c611113287b06c3b82b Reviewed-on: https://code.wireshark.org/review/5251 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
-rw-r--r--cmake/modules/FindWireshark.cmake1
-rw-r--r--cmake/modules/WiresharkConfig.cmake.in12
2 files changed, 13 insertions, 0 deletions
diff --git a/cmake/modules/FindWireshark.cmake b/cmake/modules/FindWireshark.cmake
index 27259d3c3d..507da5993a 100644
--- a/cmake/modules/FindWireshark.cmake
+++ b/cmake/modules/FindWireshark.cmake
@@ -16,6 +16,7 @@
# Wireshark_INSTALL_DIR
# Wireshark_PLUGIN_INSTALL_DIR
# Wireshark_LIB_DIR
+# Wireshark_LIBRARY
# Wireshark_INCLUDE_DIR
# Wireshark_CMAKE_MODULES_DIR
diff --git a/cmake/modules/WiresharkConfig.cmake.in b/cmake/modules/WiresharkConfig.cmake.in
index a10baad960..c3f4edfb6d 100644
--- a/cmake/modules/WiresharkConfig.cmake.in
+++ b/cmake/modules/WiresharkConfig.cmake.in
@@ -10,3 +10,15 @@ set(Wireshark_PLUGIN_INSTALL_DIR "@PLUGIN_INSTALL_DIR@")
set(Wireshark_LIB_DIR "@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@")
set(Wireshark_INCLUDE_DIR "@CMAKE_INSTALL_PREFIX@/include/wireshark")
set(Wireshark_CMAKE_MODULES_DIR "@CMAKE_INSTALL_MODULES_DIR@")
+
+find_library( Wireshark_LIBRARY
+ NAMES
+ wireshark
+ libwireshark
+ HINTS
+ ${Wireshark_LIB_DIR}
+ PATHS
+ /opt/lib/
+ /usr/lib64
+ /usr/lib
+)