[gdk-pixbuf] meson: Re-instate mediaLib support



commit 96567e97298575aa6319a9bb29fab39666fc3192
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Sat Apr 28 11:48:22 2018 +0100

    meson: Re-instate mediaLib support
    
    We dropped it with the Meson build port, and I'm not entirely sure it's
    still tested, but it doesn't cost us anything to re-enable the check.

 meson.build |   16 +++++++++++++++-
 1 files changed, 15 insertions(+), 1 deletions(-)
---
diff --git a/meson.build b/meson.build
index e9c7f2d..956b5f5 100644
--- a/meson.build
+++ b/meson.build
@@ -194,7 +194,21 @@ else
   shared_mime_dep = []
 endif
 
-gdk_pixbuf_deps = [ mathlib_dep, gobject_dep, gmodule_dep, gio_dep, shared_mime_dep ]
+# Check if medialib is available
+medialib_dep = cc.find_library('mlib', required: false)
+if medialib_dep.found()
+  if cc.has_function('mlib_ImageSetStruct', dependencies: medialib_dep)
+    gdk_pixbuf_conf.set('USE_MEDIALIB', 1)
+
+    if cc.has_function('mlib_VideoColorRGBint_to_BGRAint', dependencies: medialib_dep)
+      gdk_pixbuf_conf.set('USE_MEDIALIB25', 1)
+    endif
+  else
+    medialib_dep = []
+  endif
+endif
+
+gdk_pixbuf_deps = [ mathlib_dep, gobject_dep, gmodule_dep, gio_dep, shared_mime_dep, medialib_dep ]
 
 # Check if we can build shared modules
 build_modules = gmodule_dep.get_pkgconfig_variable('gmodule_supported') == 'true'


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