[gdk-pixbuf] build: Make X11 support optional



commit 204082e6a7a404ec7372d78ef7a7890ada595154
Author: Rasmus Thomsen <Rasmus thomsen protonmail com>
Date:   Tue Nov 28 17:42:42 2017 +0100

    build: Make X11 support optional
    
    Don't make X11 support dependent on the presence of libX11 development
    files on the build system.
    
    Add an "x11" option to control whether X11 support should be built
    or not.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=788672

 meson.build       |    9 +++++----
 meson_options.txt |    4 ++++
 2 files changed, 9 insertions(+), 4 deletions(-)
---
diff --git a/meson.build b/meson.build
index 72e1783..466a5c3 100644
--- a/meson.build
+++ b/meson.build
@@ -388,10 +388,11 @@ gnome = import('gnome')
 
 subdir('gdk-pixbuf')
 
-# X11
-x11_dep = dependency('x11', required: false)
-if x11_dep.found()
-  subdir('contrib/gdk-pixbuf-xlib')
+if get_option('x11')
+  x11_dep = cc.find_library('X11')
+    if x11_dep.found()
+      subdir('contrib/gdk-pixbuf-xlib')
+    endif
 endif
 
 # i18n
diff --git a/meson_options.txt b/meson_options.txt
index 8faab66..9eadfcc 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -14,6 +14,10 @@ option('enable_jasper',
        description: 'Enable JPEG2000 loader (requires libjasper)',
        type: 'boolean',
        value: false)
+option('x11',
+       description: 'Enable X11 support (requires libX11)',
+       type: 'boolean',
+       value: true)
 option('builtin_loaders',
        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',


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