From 5ca767f7f881f480de90882233ed833846bd8a3d Mon Sep 17 00:00:00 2001 From: Rainer Müller Date: Sat, 31 Mar 2018 00:53:56 +0200 Subject: Fix plugins on macOS The switch to the meson build system broke plugins on macOS. GNU libtool builds shared libraries with ".dylib" and shared modules (plugins) with the extension ".so", but meson is using ".dylib" for both. Although overriding the name_suffix for shared_module() in meson is possible, this would be messy for other platforms as there is no way to query the default. Therefore it seems like we have to go with ".dylib" for now on macOS. However, G_MODULE_SUFFIX is defined to ".so", because glib follows what GNU libtool does. Therefore define a separate preprocessor macro that has the correct extension. See: https://github.com/mesonbuild/meson/issues/1160 --- src/common/plugin.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/common/plugin.c') diff --git a/src/common/plugin.c b/src/common/plugin.c index 3ad3c558..1db11f35 100644 --- a/src/common/plugin.c +++ b/src/common/plugin.c @@ -464,10 +464,10 @@ plugin_auto_load (session *sess) for_files (lib_dir, "hcwinamp.dll", plugin_auto_load_cb); for_files (lib_dir, "hcsysinfo.dll", plugin_auto_load_cb); #else - for_files (lib_dir, "*."G_MODULE_SUFFIX, plugin_auto_load_cb); + for_files (lib_dir, "*."PLUGIN_SUFFIX, plugin_auto_load_cb); #endif - for_files (sub_dir, "*."G_MODULE_SUFFIX, plugin_auto_load_cb); + for_files (sub_dir, "*."PLUGIN_SUFFIX, plugin_auto_load_cb); g_free (sub_dir); } -- cgit 1.4.1