diff options
author | Matthew Waters <matthew@centricular.com> | 2018-10-08 17:18:56 +1100 |
---|---|---|
committer | Matthew Waters <matthew@centricular.com> | 2018-10-08 21:48:24 +1100 |
commit | 8c76a02bc6fffcb0fc57d855cec3afd694fbfe5c (patch) | |
tree | 45d2acb3d314ecb5885576a04559043675332ca5 | |
parent | a40611a88aab76de89f1defd68341169af992e3a (diff) | |
download | gdk-pixbuf-8c76a02bc6fffcb0fc57d855cec3afd694fbfe5c.tar.gz |
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.
-rw-r--r-- | meson.build | 8 | ||||
-rw-r--r-- | 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) + |