[shotwell] build: Expose varios code options through meson config



commit 65239afd1b8efecd6045e84f1c67ada0b2fb78c3
Author: Jens Georg <mail jensge org>
Date:   Sat May 27 23:50:38 2017 +0200

    build: Expose varios code options through meson config

 meson.build       |   14 ++++++++++++++
 meson_options.txt |    3 +++
 2 files changed, 17 insertions(+), 0 deletions(-)
---
diff --git a/meson.build b/meson.build
index 8d97fd5..88c445f 100644
--- a/meson.build
+++ b/meson.build
@@ -65,6 +65,20 @@ foreach publisher : get_option('publishers').split(',')
                        language : 'vala')
 endforeach
 
+foreach trace : get_option('trace').split(',')
+  add_global_arguments(['--define=TRACE_@0@'.format(trace.to_upper().underscorify())],
+                       language : 'vala')
+endforeach
+
+foreach measure : get_option('measure').split(',')
+  add_global_arguments(['--define=MEASURE_@0@'.format(trace.to_upper().underscorify())],
+                       language : 'vala')
+endforeach
+
+if get_option('disable-dupe-detection')
+  add_global_arguments(['--define=NO_DUPE_DETECTION'], language : vala)
+endif
+
 json_glib = dependency('json-glib-1.0')
 gdata = dependency('libgdata')
 gcr = dependency('gcr-3')
diff --git a/meson_options.txt b/meson_options.txt
index 649e849..2bb4315 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -1,3 +1,6 @@
 option('enable-unity-support', type: 'boolean', value : 'false', description: 'Enable Ubuntu Unity support')
 option('publishers', type: 'string', value : 
'facebook,flickr,picasa,piwigo,youtube,gallery3,rajce,tumblr,yandex', description: 'The list of publishing 
plugins to build')
 option('enable-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('disable-dupe-detection', type: 'boolean', value : 'false', description: 'Disable duplicate checks')


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