From b2692484b7f4ba4ac21df4f4d3050d33241c271c Mon Sep 17 00:00:00 2001 From: Hermet Park Date: Fri, 7 Apr 2023 13:46:03 +0900 Subject: [PATCH] infra - add 'all' option for savers. ex) meson . build -Dsavers="all", ... --- meson.build | 18 +++++++++++++++--- meson_options.txt | 2 +- src/savers/meson.build | 2 +- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/meson.build b/meson.build index 8ba4306f..0fe521ea 100644 --- a/meson.build +++ b/meson.build @@ -13,6 +13,7 @@ add_project_arguments('-DEXAMPLE_DIR="@0@/src/examples/images"'.format(src_dir), config_h.set_quoted('THORVG_VERSION_STRING', meson.project_version()) +#Engines if get_option('engines').contains('sw') == true config_h.set10('THORVG_SW_RASTER_SUPPORT', true) endif @@ -21,6 +22,7 @@ if get_option('engines').contains('gl') == true config_h.set10('THORVG_GL_RASTER_SUPPORT', true) endif +#Loaders all_loaders = false if get_option('loaders').contains('all') == true @@ -43,10 +45,18 @@ if all_loaders or get_option('loaders').contains('jpg') == true config_h.set10('THORVG_JPG_LOADER_SUPPORT', true) endif -if get_option('savers').contains('tvg') == true +#Savers +all_savers = false + +if get_option('savers').contains('all') == true + all_savers = true +endif + +if all_savers or get_option('savers').contains('tvg') == true config_h.set10('THORVG_TVG_SAVER_SUPPORT', true) endif +#Vectorization simd_type = 'none' if get_option('vector') == true @@ -59,15 +69,17 @@ if get_option('vector') == true endif endif +#Bindings if get_option('bindings').contains('capi') == true config_h.set10('THORVG_CAPI_BINDING_SUPPORT', true) endif +#Log if get_option('log') == true config_h.set10('THORVG_LOG_ENABLED', true) endif - +#Tools all_tools = false if get_option('tools').contains('all') == true @@ -121,7 +133,7 @@ Summary: 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'), + all_savers or get_option('savers').contains('tvg'), get_option('bindings').contains('capi'), get_option('log'), get_option('tests'), diff --git a/meson_options.txt b/meson_options.txt index 056f897a..114e0c5b 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -12,7 +12,7 @@ option('loaders', option('savers', type: 'array', - choices: ['', 'tvg'], + choices: ['', 'tvg', 'all'], value: [''], description: 'Enable File Savers in thorvg') diff --git a/src/savers/meson.build b/src/savers/meson.build index 2b35e381..56cacaa6 100644 --- a/src/savers/meson.build +++ b/src/savers/meson.build @@ -1,6 +1,6 @@ subsaver_dep = [] -if get_option('savers').contains('tvg') == true +if all_savers or get_option('savers').contains('tvg') == true subdir('tvg') endif