summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2018-04-28 11:48:22 +0100
committerEmmanuele Bassi <ebassi@gnome.org>2018-04-29 17:45:55 +0100
commit96567e97298575aa6319a9bb29fab39666fc3192 (patch)
tree47ce3a35455a8a756bbbaffb402fd52e3cad5ec7
parent979a87b9bcf40d583251f6e450a7afd8f07d1fe1 (diff)
downloadgdk-pixbuf-96567e97298575aa6319a9bb29fab39666fc3192.tar.gz
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.
-rw-r--r--meson.build16
1 files changed, 15 insertions, 1 deletions
diff --git a/meson.build b/meson.build
index e9c7f2de1..956b5f58d 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'