infra - add 'all' option for savers.

ex) meson . build -Dsavers="all", ...
This commit is contained in:
Hermet Park 2023-04-07 13:46:03 +09:00
parent daecef5acd
commit b2692484b7
3 changed files with 17 additions and 5 deletions

View file

@ -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'),

View file

@ -12,7 +12,7 @@ option('loaders',
option('savers',
type: 'array',
choices: ['', 'tvg'],
choices: ['', 'tvg', 'all'],
value: [''],
description: 'Enable File Savers in thorvg')

View file

@ -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