[gdk-pixbuf: 1/5] meson: add option for disabling GIO sniffing
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gdk-pixbuf: 1/5] meson: add option for disabling GIO sniffing
- Date: Tue, 4 Dec 2018 20:42:18 +0000 (UTC)
commit 8c76a02bc6fffcb0fc57d855cec3afd694fbfe5c
Author: Matthew Waters <matthew centricular com>
Date: Mon Oct 8 17:18:56 2018 +1100
meson: add option for disabling GIO sniffing
Some linux-like platforms (e.g. Android) don't have a mime-info database
readily available for use.
meson.build | 8 ++++----
meson_options.txt | 5 +++++
2 files changed, 9 insertions(+), 4 deletions(-)
---
diff --git a/meson.build b/meson.build
index 43b11f61a..6b0ba49e2 100644
--- a/meson.build
+++ b/meson.build
@@ -189,11 +189,11 @@ gmodule_dep = dependency('gmodule-no-export-2.0')
gio_dep = dependency('gio-2.0')
# On non-Windows/macOS systems we always required shared-mime-info and GIO
-if host_system != 'windows' and host_system != 'darwin'
- shared_mime_dep = dependency('shared-mime-info')
+# shared_mime_dep = []
+shared_mime_dep = []
+if get_option('gio_sniffing') and host_system != 'windows' and host_system != 'darwin'
+ shared_mime_dep += dependency('shared-mime-info')
gdk_pixbuf_conf.set('GDK_PIXBUF_USE_GIO_MIME', 1)
-else
- shared_mime_dep = []
endif
# Check if medialib is available
diff --git a/meson_options.txt b/meson_options.txt
index 9f6b6505e..a7c33a869 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -46,3 +46,8 @@ option('installed_tests',
description: 'Install the test suite',
type: 'boolean',
value: true)
+option('gio_sniffing',
+ description: 'Perform file type detection using GIO (Unused on MacOS and Windows)',
+ type: 'boolean',
+ value: true)
+
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]