From 64f789c6e28c252d5ae6834cdac810738dfd020c Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan Date: Mon, 11 Jun 2018 07:02:08 +0530 Subject: [PATCH] meson: Always set G_MODULE_SUFFIX to `so` on macOS This is what Autotools does, and it's what all consumers of the GModule API expect. Without this change, people on macOS upgrading to a GLib built with Meson will find that their plugins no longer load. Projects that use Meson and the `g_module_build_path()` API such as glib-networking should pass `name_suffix:` to `shared_module()` to ensure that plugins continue to be called libfoo.so on macOS. New GModule API will eventually be added to address this. See also: https://gitlab.gnome.org/GNOME/glib/issues/1413 https://gitlab.gnome.org/GNOME/glib-networking/blob/a3d81719fe7aa4a53ef49af63c19f79f09bafcdb/meson.build#L108 --- meson.build | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/meson.build b/meson.build index cc981ef69..a03b73c55 100644 --- a/meson.build +++ b/meson.build @@ -1296,11 +1296,9 @@ glibconfig_conf.set('glongbits', long_size * 8) glibconfig_conf.set('gsizebits', sizet_size * 8) glibconfig_conf.set('gssizebits', ssizet_size * 8) -# FIXME: maybe meson should tell us the libsuffix? +# XXX: https://gitlab.gnome.org/GNOME/glib/issues/1413 if host_system == 'windows' g_module_suffix = 'dll' -elif host_system == 'darwin' - g_module_suffix = 'dylib' else g_module_suffix = 'so' endif