[shotwell/wip/phako/heif: 174/174] Make some image formats configurable



commit 3906039e0d3ec2f0e7ecd31136e393d91fe18833
Author: Jens Georg <mail jensge org>
Date:   Sat May 25 20:05:47 2019 +0200

    Make some image formats configurable

 meson.build       | 11 ++++++++++-
 meson_options.txt |  1 +
 2 files changed, 11 insertions(+), 1 deletion(-)
---
diff --git a/meson.build b/meson.build
index a2924725..cfcf4e14 100644
--- a/meson.build
+++ b/meson.build
@@ -72,7 +72,6 @@ clutter_gtk = dependency('clutter-gtk-1.0')
 webpdemux = dependency('libwebpdemux')
 webp = dependency('libwebp')
 
-heif = dependency('libheif')
 
 unity_available = false
 if unity.found() and get_option('unity-support')
@@ -80,6 +79,16 @@ if unity.found() and get_option('unity-support')
   add_global_arguments(['--define=UNITY_SUPPORT'], language : 'vala')
 endif
 
+foreach image_format: get_option('additional_image_formats')
+    if image_format == 'heif'
+        heif = dependency('libheif')
+    endif
+    add_global_arguments(
+        ['--define=HAVE_@0@'.format(image_format.to_upper())],
+        language : 'vala'
+    )
+endforeach
+
 foreach publisher : get_option('publishers')
   add_global_arguments(['--define=HAVE_@0@'.format(publisher.to_upper())],
                        language : 'vala')
diff --git a/meson_options.txt b/meson_options.txt
index 0338d469..1886b5a9 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -10,3 +10,4 @@ option('face-detection', type:'boolean', value:false, description: 'Enable face
 option('face-detection-helper', type : 'boolean', value : 'true', description : 'If face-detection is 
enabled, build the external helper tool')
 option('face_detection_helper_bus', type:'combo', choices: ['private', 'session'], value : 'session', 
description: 'Which DBus bus to use for external helper tool')
 option('fatal_warnings', type:'boolean', value:false)
+option('additional_image_formats', type: 'array', choices : ['heif'], value: ['heif'])


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