gplugin/gplugin

Parents 43e6e473ef50
Children 69057d35c18c
G_MODULE_SUFFIX returns "so" on everything that's not windows. Autotools creates libs with "so" on macos, but meson creates "dylib". So when on macos, look for both.
--- a/gplugin/gplugin-native-loader.c Tue Jul 02 21:58:52 2019 -0500
+++ b/gplugin/gplugin-native-loader.c Mon Jul 15 15:21:43 2019 -0500
@@ -94,7 +94,17 @@
*****************************************************************************/
static GSList *
gplugin_native_loader_class_supported_extensions(G_GNUC_UNUSED const GPluginLoaderClass *klass) {
- return g_slist_append(NULL, G_MODULE_SUFFIX);
+ GSList *exts = g_slist_append(NULL, G_MODULE_SUFFIX);
+
+#if defined(__APPLE__) || defined(__MACH__)
+ /* G_MODULE_SUFFIX only requests so on not windows, and both .so and
+ * .dylib are use on macos, so add dylib if we're on macos.
+ * See: https://gitlab.gnome.org/GNOME/glib/issues/1413
+ */
+ exts = g_slist_append(exts, "dylib");
+#endif
+
+ return exts;
}
static GPluginPluginInfo *