[shotwell] build: Use array instead of string + split



commit 0f4148dfa5df752af10f994b726f9f7ec648b9d2
Author: Jens Georg <mail jensge org>
Date:   Sat Oct 26 13:53:46 2019 +0200

    build: Use array instead of string + split

 meson.build       | 6 +++---
 meson_options.txt | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/meson.build b/meson.build
index fda28500..6a06b349 100644
--- a/meson.build
+++ b/meson.build
@@ -78,17 +78,17 @@ if unity.found() and get_option('unity-support')
   add_global_arguments(['--define=UNITY_SUPPORT'], language : 'vala')
 endif
 
-foreach publisher : get_option('publishers').split(',')
+foreach publisher : get_option('publishers')
   add_global_arguments(['--define=HAVE_@0@'.format(publisher.to_upper())],
                        language : 'vala')
 endforeach
 
-foreach trace : get_option('trace').split(',')
+foreach trace : get_option('trace')
   add_global_arguments(['--define=TRACE_@0@'.format(trace.to_upper().underscorify())],
                        language : 'vala')
 endforeach
 
-foreach measure : get_option('measure').split(',')
+foreach measure : get_option('measure')
   add_global_arguments(['--define=MEASURE_@0@'.format(trace.to_upper().underscorify())],
                        language : 'vala')
 endforeach
diff --git a/meson_options.txt b/meson_options.txt
index fe15ee75..0338d469 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -1,8 +1,8 @@
 option('unity-support', type: 'boolean', value : 'false', description: 'Enable Ubuntu Unity support')
-option('publishers', type: 'string', value : 'flickr,googlephotos,piwigo,youtube,gallery3,tumblr', 
description: 'The list of publishing plugins to build')
+option('publishers', type: 'array', choices: 
['flickr','googlephotos','piwigo','youtube','gallery3','tumblr'], value : 
['flickr','googlephotos','piwigo','youtube','gallery3','tumblr'], description: 'The list of publishing 
plugins to build')
 option('extra-plugins', type : 'boolean', value : 'true', description: 'Enable building and installation of 
extra publishing plugins')
-option('trace', type: 'string', value : '', description: 'Enable various trace  options (available: dtors, 
import, md5, metadata-writer, monitoring, pixbuf-cache, reflow, reflow-items)')
-option('measure', type: 'string', value : '', description : 'Enable various timing measurements(available : 
enhance, import, pipeline, view-filtering, thumbnail-cache)')
+option('trace', type: 'array', choices: ['dtors', 'import', 'md5', 'metadata-writer', 'monitoring', 
'pixbuf-cache', 'reflow', 'reflow-items'], value : [], description: 'Enable various trace options')
+option('measure', type: 'array', choices: ['enhance', 'import', 'pipeline', 'view-filtering', 
'thumbnail-cache'], value : [], description : 'Enable various timing measurements')
 option('dupe-detection', type: 'boolean', value : 'true', description: 'Disable duplicate checks')
 option('udev', type: 'boolean', value : 'true', description: 'Enable or disable udev support')
 option('install-apport-hook', type : 'boolean', value : 'true', description: 'Enable Ubuntu apport hook')


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