[gegl] Fix meson build on Darwin platform and replace library extension



commit 2bc06bfedee4fb25f6a966c8235b75292e24e55f
Author: Alex Samorukov <samm net-art cz>
Date:   Thu Oct 31 09:20:11 2019 +0000

    Fix meson build on Darwin platform and replace library extension

 gegl/meson.build           | 3 +++
 gegl/module/geglmoduledb.c | 5 ++++-
 2 files changed, 7 insertions(+), 1 deletion(-)
---
diff --git a/gegl/meson.build b/gegl/meson.build
index 020639be9..12c753cab 100644
--- a/gegl/meson.build
+++ b/gegl/meson.build
@@ -80,6 +80,8 @@ install_headers(gegl_headers,
   subdir: api_name
 )
 
+gegl_ldflags = os_osx ? ['-framework', 'OpenCL'] : []
+
 gegl_lib = library(api_name,
   gegl_sources,
   include_directories: [ rootInclude, geglInclude, ],
@@ -91,6 +93,7 @@ gegl_lib = library(api_name,
     gmodule,
   ],
   c_args: [ gegl_cflags, ],
+  link_args: [ gegl_ldflags, ],
   install: true,
   version: so_version,
 )
diff --git a/gegl/module/geglmoduledb.c b/gegl/module/geglmoduledb.c
index 8821df216..f7d7936f0 100644
--- a/gegl/module/geglmoduledb.c
+++ b/gegl/module/geglmoduledb.c
@@ -310,8 +310,11 @@ valid_module_name (const gchar *filename)
           return FALSE;
         }
     }
-
+#ifdef __APPLE__ /* G_MODULE_SUFFIX is defined to .so instead of .dylib */
+  if (! gegl_datafiles_check_extension (basename, ".dylib" ))
+#else
   if (! gegl_datafiles_check_extension (basename, "." G_MODULE_SUFFIX))
+#endif
     {
       g_free (basename);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]