aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBalint Reczey <balint@balintreczey.hu>2014-03-04 14:59:39 +0100
committerBalint Reczey <balint@balintreczey.hu>2014-03-08 23:55:38 +0000
commitff6cc9b0cba3096face296f9dba118163b7dc0cc (patch)
treec23a265d229664b439d5ff6a8ba77098d3825bc3
parented1528d339096288e7f9c11ffe1a6fe33bca7712 (diff)
Add pkg-config file
Change-Id: Ia55a2e560aef8d2f9a3cede18af4555507656047 Reviewed-on: https://code.wireshark.org/review/500 Reviewed-by: Evan Huus <eapache@gmail.com> Tested-by: Balint Reczey <balint@balintreczey.hu> Reviewed-by: Balint Reczey <balint@balintreczey.hu>
-rw-r--r--CMakeLists.txt9
-rw-r--r--wireshark.pc.in14
2 files changed, 23 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c52959643c..c499046afd 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -640,6 +640,7 @@ set_property(GLOBAL PROPERTY USE_FOLDERS ON)
if(ENABLE_PLUGINS)
set(HAVE_PLUGINS 1)
set(PLUGIN_DIR="${DATAFILE_DIR}/plugins/${CPACK_PACKAGE_VERSION}")
+ set(PLUGIN_INSTALL_DIR="${CMAKE_INSTALL_LIBDIR}/@CPACK_PACKAGE_NAME@/plugins/${CPACK_PACKAGE_VERSION}")
set(PLUGIN_SRC_DIRS
plugins/docsis
plugins/ethercat
@@ -735,6 +736,7 @@ else()
endif()
configure_file(${CMAKE_SOURCE_DIR}/cmakeconfig.h.in ${CMAKE_BINARY_DIR}/config.h)
+configure_file(${CMAKE_SOURCE_DIR}/wireshark.pc.in ${CMAKE_BINARY_DIR}/wireshark.pc @ONLY)
if( ENABLE_GUIDES )
configure_file(
${CMAKE_SOURCE_DIR}/doxygen_global.cfg
@@ -1431,6 +1433,13 @@ install(
)
install(
+ FILES
+ "${CMAKE_BINARY_DIR}/wireshark.pc"
+ DESTINATION
+ ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/pkgconfig
+)
+
+install(
DIRECTORY
${INSTALL_DIRS}
DIRECTORY_PERMISSIONS
diff --git a/wireshark.pc.in b/wireshark.pc.in
new file mode 100644
index 0000000000..91bf28b77a
--- /dev/null
+++ b/wireshark.pc.in
@@ -0,0 +1,14 @@
+prefix=@CMAKE_INSTALL_PREFIX@
+exec_prefix=${prefix}
+libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@
+sharedlibdir=${libdir}
+includedir=${prefix}/include/wireshark
+plugindir=@PLUGIN_INSTALL_DIR@
+
+Name: wireshark
+Description: wireshark network packet dissection library
+Version: @PROJECT_VERSION@
+
+Requires:
+Libs: -L${libdir} -L${sharedlibdir} -lwireshark
+Cflags: -I${includedir}