Change-Id: Ib41b9a84333a3d3d34ae9c0797dbae10141f9e53
Reviewed-on: https://code.wireshark.org/review/29235
Reviewed-by: João Valverde <j@v6e.pt>
pkg_check_modules(WIRESHARK REQUIRED wireshark>=2.5)
### CMake Bug: Use PKG_CONFIG_PATH instead of CMAKE_PREFIX_PATH
# https://gitlab.kitware.com/cmake/cmake/issues/15805
-### CMake Bug: If you run into problems please use the "Unix Makefiles" generator.
-### Ninja just wipes the pkg-config variables.
-# https://gitlab.kitware.com/cmake/cmake/issues/17531 (and probably others)
+# Note: If using PKG_CONFIG_PATH the variable needs to be set as exported
+# in the execution environment.
pkg_get_variable(WIRESHARK_PLUGIN_DIR wireshark plugindir)
set(PLUGIN_INSTALL_LIBDIR "${WIRESHARK_PLUGIN_DIR}/epan")