Commit Graph

4 Commits

Author SHA1 Message Date
João Valverde b52d9173f8 Remove version component from plugin path
Remove the major.minor version from the plugin path, i.e:
    lib/plugins/X.Y/{epan,wiretap,codecs}
and use an unversioned path:
    lib/plugins/{epan,wiretap,codecs}

Introduce a new naming policy for plugins that requires
name.so.ABI_VERSION.

This is a simplified filesystem layoutfor plugins some
important benefits such as:

 * improves compatibility between Wireshark versions, because
a plugin that wasn't recompiled will be automatically picked
up, but only if it has a compatible ABI version in the file name.
 * does not clash with Apple guidelines
 * simpler for users to understand and apply
 * just overall simpler and easier to maintain, removes a lot
of complexity from CMake code

It does impose more requirements on the plugin naming scheme
but this should be handled completely transparently
by the build system.

It would also be possible to add support for unversioned *.so file
extensions at the same time, although in ths case it is not possible
to support multiple Wireshark ABI versions with only *.so, of course.
This wasn't done here but it may or may not be a useful enhancement
in the future.

Follow-up to 90b16b4092.
2023-12-14 14:28:30 +00:00
João Valverde 60dedef3f1 CMake: Fix config package without installed plugins or extcaps 2023-06-17 11:09:30 +00:00
João Valverde c451e572e5 plugins.example: Make installation relocatable
Fixes "make install" to be relocatable using DESTDIR. For that
we cannot use an absolute path as intallation directory target.
This is useful mostly to implement packaging using CPack.

It is a bit awkward to configure a default CMAKE_INSTALL_PREFIX
using WiresharkConfig.cmake but it seems to be working OK.

The previous non-relocatable behaviour may still be useful. It is
relegated to a custom "copy_plugin" target.
2022-03-28 13:23:28 +00:00
João Valverde d0b97a420d 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>
2018-08-25 18:07:21 +00:00