infra: add all option to enable all loader formats.
authorHermet Park <hermetpark@gmail.com>
Wed, 6 Oct 2021 02:13:49 +0000 (11:13 +0900)
committerJunsuChoi <jsuya.choi@samsung.com>
Wed, 6 Oct 2021 03:04:26 +0000 (12:04 +0900)
just for developer convenience (including me)

ex) $meson . build -Dloaders="all" ...

meson.build
meson_options.txt
src/loaders/meson.build

index 5ab4edf..41b1aa3 100644 (file)
@@ -20,19 +20,25 @@ if get_option('engines').contains('gl') == true
     config_h.set10('THORVG_GL_RASTER_SUPPORT', true)
 endif
 
-if get_option('loaders').contains('svg') == true
+all_loaders = false
+
+if get_option('loaders').contains('all') == true
+    all_loaders = true
+endif
+
+if all_loaders or get_option('loaders').contains('svg') == true
     config_h.set10('THORVG_SVG_LOADER_SUPPORT', true)
 endif
 
-if get_option('loaders').contains('tvg') == true
+if all_loaders or get_option('loaders').contains('tvg') == true
     config_h.set10('THORVG_TVG_LOADER_SUPPORT', true)
 endif
 
-if get_option('loaders').contains('png') == true
-    config_h.set10('THORVG_PNG_LOADER_SUPPORT', true)
+if all_loaders or get_option('loaders').contains('png') == true
+   config_h.set10('THORVG_PNG_LOADER_SUPPORT', true)
 endif
 
-if get_option('loaders').contains('jpg') == true
+if all_loaders or get_option('loaders').contains('jpg') == true
     config_h.set10('THORVG_JPG_LOADER_SUPPORT', true)
 endif
 
@@ -102,10 +108,10 @@ Summary:
         simd_type,
         get_option('engines').contains('sw'),
         get_option('engines').contains('gl'),
-        get_option('loaders').contains('tvg'),
-        get_option('loaders').contains('svg'),
-        get_option('loaders').contains('png'),
-        get_option('loaders').contains('jpg'),
+        all_loaders or get_option('loaders').contains('tvg'),
+        all_loaders or get_option('loaders').contains('svg'),
+        all_loaders or get_option('loaders').contains('png'),
+        all_loaders or get_option('loaders').contains('jpg'),
         get_option('savers').contains('tvg'),
         get_option('bindings').contains('capi'),
         get_option('log'),
index 7d9368c..5f55020 100644 (file)
@@ -6,7 +6,7 @@ option('engines',
 
 option('loaders',
    type: 'array',
-   choices: ['', 'tvg', 'svg', 'png', 'jpg'],
+   choices: ['', 'tvg', 'svg', 'png', 'jpg', 'all'],
    value: ['svg', 'tvg', 'png', 'jpg'],
    description: 'Enable File Loaders in thorvg')
 
index d61fef4..d30f757 100644 (file)
@@ -1,21 +1,21 @@
 subloader_dep = []
 
-if get_option('loaders').contains('tvg') == true
+if all_loaders or get_option('loaders').contains('tvg') == true
     subdir('tvg')
 endif
 
-if get_option('loaders').contains('svg') == true
+if all_loaders or get_option('loaders').contains('svg') == true
     subdir('svg')
 endif
 
-if get_option('loaders').contains('png') == true
+if all_loaders or get_option('loaders').contains('png') == true
     subdir('external_png')
     if not png_dep.found()
         subdir('png')
     endif
 endif
 
-if get_option('loaders').contains('jpg') == true
+if all_loaders or get_option('loaders').contains('jpg') == true
     subdir('external_jpg')
     if not jpg_dep.found()
         subdir('jpg')