diff options
author | Chun-wei Fan <fanchunwei@src.gnome.org> | 2017-08-04 14:41:55 +0800 |
---|---|---|
committer | Chun-wei Fan <fanchunwei@src.gnome.org> | 2017-08-21 15:19:08 +0800 |
commit | 98ebded2cdcb54ea542b9e04773c59783ea7d82c (patch) | |
tree | 2eb64e229ec5c0a379decea19706f2e0d6c83dd6 | |
parent | 64ac9d7a37986eef404914b66e220e0ea530b845 (diff) | |
download | gdk-pixbuf-98ebded2cdcb54ea542b9e04773c59783ea7d82c.tar.gz |
build: Allow 'all' shorthand for builtin_loaders build option
To ease packaging of the built binaries, provide an 'all' shorthand for
making all the buildable loaders built into the main GDK-Pixbuf library,
so that we do not need to distribute them as well, and makes it easier
so that one will not have to try to find and enter all the names of the
loaders that are shipped with GDK-Pixbuf.
https://bugzilla.gnome.org/show_bug.cgi?id=785767
-rw-r--r-- | gdk-pixbuf/meson.build | 4 | ||||
-rw-r--r-- | meson.build | 7 | ||||
-rw-r--r-- | meson_options.txt | 2 |
3 files changed, 10 insertions, 3 deletions
diff --git a/gdk-pixbuf/meson.build b/gdk-pixbuf/meson.build index 209c2c45f..0e8c8b4d1 100644 --- a/gdk-pixbuf/meson.build +++ b/gdk-pixbuf/meson.build @@ -110,7 +110,7 @@ foreach l: loaders sources = l[1] cond = l.get(2, true) - if cond and builtin_loaders.contains(name) + if cond and (builtin_loaders.contains(name) or builtin_all_loaders) cflag_for_included_loader = ['-DINCLUDE_@0@'.format(name)] included_loaders_cflags += cflag_for_included_loader @@ -149,7 +149,7 @@ foreach l: loaders sources = l[1] cond = l.get(2, true) - if cond and not builtin_loaders.contains(name) + if cond and not (builtin_loaders.contains(name) or builtin_all_loaders) mod = shared_module('pixbufloader-@0@'.format(name), sources, dependencies: loaders_deps + gdk_pixbuf_deps + [ gdkpixbuf_dep ], diff --git a/meson.build b/meson.build index 7daa4ce67..edd1ab98a 100644 --- a/meson.build +++ b/meson.build @@ -203,6 +203,13 @@ gdk_pixbuf_conf.set10('USE_GMODULE', build_modules) # Check which loaders should be built into gdk-pixbuf builtin_loaders = get_option('builtin_loaders').split(',') +# If 'all' is specified for builtin_loaders, build all +# buildable loaders into gdk-pixbuf +builtin_all_loaders = false +if builtin_loaders == [ 'all' ] + builtin_all_loaders = true +endif + # Loader dependencies enabled_loaders = [] loaders_deps = [] diff --git a/meson_options.txt b/meson_options.txt index 1c761dbeb..ba6524698 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -15,7 +15,7 @@ option('enable_jasper', type: 'boolean', value: false) option('builtin_loaders', - description: 'Comma-separated list of loaders to build into gdk-pixbuf, or "none"', + description: 'Comma-separated list of loaders to build into gdk-pixbuf, or "none", or "all" to build all buildable loaders into gdk-pixbuf', type: 'string', value: 'none') option('with_docs', |