[gdk-pixbuf] build: Allow 'all' shorthand for builtin_loaders build option



commit 98ebded2cdcb54ea542b9e04773c59783ea7d82c
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Fri Aug 4 14:41:55 2017 +0800

    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

 gdk-pixbuf/meson.build |    4 ++--
 meson.build            |    7 +++++++
 meson_options.txt      |    2 +-
 3 files changed, 10 insertions(+), 3 deletions(-)
---
diff --git a/gdk-pixbuf/meson.build b/gdk-pixbuf/meson.build
index 209c2c4..0e8c8b4 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 7daa4ce..edd1ab9 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 1c761db..ba65246 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',


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