[gtk+/wip/meson: 90/135] meson: move colord checks into cups printbackend



commit 73ebfb82b6e899467b4563052424b94a0ff6ab71
Author: Tim-Philipp Müller <tim centricular com>
Date:   Wed Mar 22 18:25:09 2017 +0000

    meson: move colord checks into cups printbackend
    
    Which is the only user of it. Also add option to enable/disable.

 meson.build                            |    3 +--
 meson_options.txt                      |    2 ++
 modules/printbackends/cups/meson.build |    9 +++++++++
 3 files changed, 12 insertions(+), 2 deletions(-)
---
diff --git a/meson.build b/meson.build
index 22877f3..2efee4a 100644
--- a/meson.build
+++ b/meson.build
@@ -196,11 +196,11 @@ pixbuf_dep     = dependency('gdk-pixbuf-2.0', version: gdk_pixbuf_req)
 epoxy_dep      = dependency('epoxy', version: epoxy_req)
 atk_dep        = dependency('atk', version: atk_req)
 gmodule_dep    = dependency('gmodule-2.0', version: glib_req)
-colord_dep     = dependency('colord', version: '>= 0.1.9', required: false)
 harfbuzz_dep   = dependency('harfbuzz', version: '>= 0.9', required: false)
 xkbdep         = dependency('xkbcommon', version: '>= 0.2.0')
 graphene_dep   = dependency('graphene-1.0', version: graphene_req,
                             fallback : ['graphene', 'graphene_dep'])
+
 fontconfig_dep = [] # only used in x11 backend
 atkbridge_dep  = [] # only used in x11 backend
 
@@ -332,7 +332,6 @@ endif
 mlib = cc.find_library('m', required: false)
 
 cdata.set('HAVE_GIO_UNIX', giounix_dep.found())
-cdata.set('HAVE_COLORD', colord_dep.found())
 
 # Check for Vulkan support
 # TODO: move to gsk subfolder maybe? Or will it be used elsewhere too?
diff --git a/meson_options.txt b/meson_options.txt
index 767be8f..7ccabfd 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -1,3 +1,5 @@
+option('enable-colord', type: 'combo', choices : ['yes', 'no', 'auto'], value : 'auto',
+  description : 'Build colord support code')
 option('enable-x11-backend', type: 'boolean', value: 'true',
   description : 'Enable the X11 gdk backend')
 option('enable-wayland-backend', type: 'boolean', value: 'true',
diff --git a/modules/printbackends/cups/meson.build b/modules/printbackends/cups/meson.build
index a709a9f..08c1154 100644
--- a/modules/printbackends/cups/meson.build
+++ b/modules/printbackends/cups/meson.build
@@ -1,3 +1,12 @@
+enable_colord = get_option('enable-colord')
+if enable_colord != 'no'
+  want_colord = enable_colord == 'yes'
+  colord_dep = dependency('colord', version: '>= 0.1.9', required: want_colord)
+  cdata.set('HAVE_COLORD', colord_dep.found())
+else
+  colord_dep = []
+endif
+
 shared_module('printbackend-cups',
   'gtkprintbackendcups.c',
   'gtkprintercups.c',


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