# Directory where plugins and Lua dissectors can be found.
set(PLUGIN_VERSION_DIR "plugins/${CPACK_PACKAGE_VERSION}")
set(PLUGIN_INSTALL_LIBDIR "${CMAKE_INSTALL_LIBDIR}/${CPACK_PACKAGE_NAME}/${PLUGIN_VERSION_DIR}")
+# Used by the WiresharkConfig.cmake.in module
if (WIN32)
set(PLUGIN_INSTALL_DIR "${PLUGIN_VERSION_DIR}")
else ()
/* Support for pcap-ng */
#cmakedefine PCAP_NG_DEFAULT 1
-/* Plugin installation directory */
-#cmakedefine PLUGIN_INSTALL_DIR "${PLUGIN_INSTALL_DIR}"
-
/* Define if we are using version of of the Portaudio library API */
#cmakedefine PORTAUDIO_API_1 1
include(UseABICheck)
+if(NOT WIN32)
+ add_definitions(-DPLUGIN_DIR=\"${CMAKE_INSTALL_FULL_LIBDIR}/wireshark/plugins\")
+endif()
+
set(WSUTIL_PUBLIC_HEADERS
adler32.h
base32.h
-DTOP_SRCDIR=\"$(abs_top_srcdir)\" \
-DDATAFILE_DIR=\"$(pkgdatadir)\" \
-DEXTCAP_DIR=\"$(extcapdir)\" \
- -DPLUGIN_INSTALL_DIR=\"$(plugindir)\" \
+ -DPLUGIN_DIR=\"$(pkglibdir)/plugins\" \
-DJSMN_STRICT \
$(GLIB_CFLAGS) $(LIBGCRYPT_CFLAGS) \
$(LIBGNUTLS_CFLAGS)
* otherwise, if we're running from an app bundle in macOS, we
* use the Contents/PlugIns/wireshark subdirectory of the app bundle;
*
- * otherwise, we use the PLUGIN_INSTALL_DIR value supplied by the
+ * otherwise, we use the PLUGIN_DIR value supplied by the
* configure script.
*/
static char *plugin_dir = NULL;
}
#endif
else {
- plugin_dir = g_strdup(PLUGIN_INSTALL_DIR);
+ plugin_dir = g_strdup(PLUGIN_DIR);
}
}
#endif
}
}
else
- plugins_scan_dir(plugin_dir, mode);
+ {
+ plugin_dir_path = g_strdup_printf("%s" G_DIR_SEPARATOR_S "%s", get_plugin_dir(), VERSION);
+ plugins_scan_dir(plugin_dir_path, mode);
+ g_free(plugin_dir_path);
+ }
/*
* If the program wasn't started with special privileges,
*/
if (!started_with_special_privs())
{
- plugins_scan_dir(get_plugins_pers_dir(), mode);
+ plugin_dir_path = g_strdup_printf("%s" G_DIR_SEPARATOR_S "%s", get_plugins_pers_dir(), VERSION);
+ plugins_scan_dir(plugin_dir_path, mode);
+ g_free(plugin_dir_path);
}
}
}