aboutsummaryrefslogtreecommitdiffstats
path: root/cmake/modules
diff options
context:
space:
mode:
authorJoão Valverde <joao.valverde@tecnico.ulisboa.pt>2018-08-23 22:03:28 +0100
committerJoão Valverde <j@v6e.pt>2018-08-25 18:07:21 +0000
commitd0b97a420d557042938ac5d6bf075fcd84df9371 (patch)
tree4075a2072c60cf242d25b2706ce08ebd6f78750a /cmake/modules
parente75905a583432e8b20cecdde71c41d17cb781392 (diff)
CMake: Modernize config-file package support
A CMake config-file package provides support for downstreams using CMake and Wireshark libraries to easily configure the libwireshark dependency with: find_package(Wireshark CONFIG [REQUIRED]) target_link_libraries(foo epan) The FindWireshark.cmake file is no longer needed. See cmake-package(7) for more details on CMake's package system. Change-Id: Ie8af1d44417a99dd08d37959f7b2ffca88572ec2 Reviewed-on: https://code.wireshark.org/review/29208 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot Reviewed-by: João Valverde <j@v6e.pt>
Diffstat (limited to 'cmake/modules')
-rw-r--r--cmake/modules/FindWireshark.cmake26
-rw-r--r--cmake/modules/WiresharkConfig.cmake.in25
-rw-r--r--cmake/modules/WiresharkConfigVersion.cmake.in10
3 files changed, 0 insertions, 61 deletions
diff --git a/cmake/modules/FindWireshark.cmake b/cmake/modules/FindWireshark.cmake
deleted file mode 100644
index a6c72fe1ef..0000000000
--- a/cmake/modules/FindWireshark.cmake
+++ /dev/null
@@ -1,26 +0,0 @@
-# Locate the Wireshark library.
-#
-# This file is meant to be copied into projects that want to use Wireshark.
-# It will search for WiresharkConfig.cmake, which ships with Wireshark
-# and will provide up-to-date buildsystem changes. Thus there should not be
-# any need to update FindWiresharkVc.cmake again after you integrated it into
-# your project.
-#
-# This module defines the following variables:
-# Wireshark_FOUND
-# Wireshark_VERSION_MAJOR
-# Wireshark_VERSION_MINOR
-# Wireshark_VERSION_PATCH
-# Wireshark_VERSION
-# Wireshark_VERSION_STRING
-# Wireshark_INSTALL_DIR
-# Wireshark_PLUGIN_INSTALL_DIR
-# Wireshark_LIB_DIR
-# Wireshark_LIBRARY
-# Wireshark_INCLUDE_DIR
-# Wireshark_CMAKE_MODULES_DIR
-
-find_package(Wireshark ${Wireshark_FIND_VERSION} QUIET NO_MODULE PATHS $ENV{HOME} /opt/Wireshark)
-
-include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(Wireshark CONFIG_MODE)
diff --git a/cmake/modules/WiresharkConfig.cmake.in b/cmake/modules/WiresharkConfig.cmake.in
deleted file mode 100644
index 17e8212b98..0000000000
--- a/cmake/modules/WiresharkConfig.cmake.in
+++ /dev/null
@@ -1,25 +0,0 @@
-set(Wireshark_MAJOR_VERSION "@PROJECT_MAJOR_VERSION@" )
-set(Wireshark_MINOR_VERSION "@PROJECT_MINOR_VERSION@" )
-set(Wireshark_PATCH_VERSION "@PROJECT_PATCH_VERSION@" )
-set(Wireshark_VERSION @PROJECT_MAJOR_VERSION@.@PROJECT_MINOR_VERSION@.@PROJECT_PATCH_VERSION@)
-set(Wireshark_VERSION_STRING "@PROJECT_MAJOR_VERSION@.@PROJECT_MINOR_VERSION@.@PROJECT_PATCH_VERSION@")
-
-set(Wireshark_INSTALL_DIR "@CMAKE_INSTALL_PREFIX@")
-set(Wireshark_PLUGIN_INSTALL_DIR "@CMAKE_INSTALL_PREFIX@/@PLUGIN_INSTALL_VERSION_LIBDIR@")
-set(Wireshark_EXTCAP_INSTALL_DIR "@CMAKE_INSTALL_PREFIX@/@EXTCAP_INSTALL_LIBDIR@")
-
-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
-)
diff --git a/cmake/modules/WiresharkConfigVersion.cmake.in b/cmake/modules/WiresharkConfigVersion.cmake.in
deleted file mode 100644
index 0aa3286904..0000000000
--- a/cmake/modules/WiresharkConfigVersion.cmake.in
+++ /dev/null
@@ -1,10 +0,0 @@
-set(PACKAGE_VERSION @PROJECT_MAJOR_VERSION@.@PROJECT_MINOR_VERSION@.@PROJECT_PATCH_VERSION@)
-
-if("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}")
- set(PACKAGE_VERSION_COMPATIBLE FALSE)
-else()
- set(PACKAGE_VERSION_COMPATIBLE TRUE)
- if("${PACKAGE_FIND_VERSION}" STREQUAL "${PACKAGE_VERSION}")
- set(PACKAGE_VERSION_EXACT TRUE)
- endif()
-endif()