summaryrefslogtreecommitdiffstats
path: root/doc/plugins.example/README
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-10 20:34:10 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-10 20:34:10 +0000
commite4ba6dbc3f1e76890b22773807ea37fe8fa2b1bc (patch)
tree68cb5ef9081156392f1dd62a00c6ccc1451b93df /doc/plugins.example/README
parentInitial commit. (diff)
downloadwireshark-e4ba6dbc3f1e76890b22773807ea37fe8fa2b1bc.tar.xz
wireshark-e4ba6dbc3f1e76890b22773807ea37fe8fa2b1bc.zip
Adding upstream version 4.2.2.upstream/4.2.2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'doc/plugins.example/README')
-rw-r--r--doc/plugins.example/README35
1 files changed, 35 insertions, 0 deletions
diff --git a/doc/plugins.example/README b/doc/plugins.example/README
new file mode 100644
index 00000000..27d6f48d
--- /dev/null
+++ b/doc/plugins.example/README
@@ -0,0 +1,35 @@
+
+This is an example of how to build a Wireshark plugin out-of-tree. This
+is an alternative, more recent way to build Wireshark binary plugins,
+than the one in 'README.plugins', that describes in detail how to
+include a new plugin into the project source tree (here called in-tree
+build). Building a plugin out-of-tree doesn't require rebuilding the whole
+Wireshark source tree every time.
+
+You always need to rebuild plugins for each major.minor Wireshark version.
+Binary compatibility is never guaranteed between those releases and Wireshark
+will explicitly check for which version the plugin was built and refuse
+to load it otherwise.
+
+Note that the out-of-tree method builds the plugin using CMake's Config-file
+mechanism[1] for configuration. In other words the plugin build system uses
+the Wireshark headers that were installed on the system using "make install"
+or equivalent (as configured from WiresharkConfig.cmake). This is not the same
+as an in-tree build.
+
+You should of course adapt this trivial example to your own needs.
+
+To build/install the plugin:
+
+$ mkdir build && cd build
+$ cmake ..
+$ make
+$ sudo make install
+
+If your WiresharkConfig.cmake file is not in one of the standard cmake search
+paths you will have to tell cmake where to find it. You can do so using
+CMAKE_PREFIX_PATH, for example:
+
+$ cmake -DCMAKE_PREFIX_PATH="/opt/wireshark" ..
+
+[1]https://cmake.org/cmake/help/latest/manual/cmake-packages.7.html#config-file-packages