infra: add "all" option for tools.

just for developer convenience.
This commit is contained in:
Hermet Park 2021-10-13 20:24:21 +09:00 committed by Hermet Park
parent 95430fc645
commit f4d284df2a
3 changed files with 13 additions and 5 deletions

View file

@ -67,6 +67,14 @@ if get_option('log') == true
config_h.set10('THORVG_LOG_ENABLED', true) config_h.set10('THORVG_LOG_ENABLED', true)
endif endif
all_tools = false
if get_option('tools').contains('all') == true
all_tools = true
endif
configure_file( configure_file(
output: 'config.h', output: 'config.h',
configuration: config_h configuration: config_h
@ -118,8 +126,8 @@ Summary:
get_option('log'), get_option('log'),
get_option('tests'), get_option('tests'),
get_option('examples'), get_option('examples'),
get_option('tools').contains('svg2tvg'), all_tools or get_option('tools').contains('svg2tvg'),
get_option('tools').contains('svg2png'), all_tools or get_option('tools').contains('svg2png'),
) )
message(summary) message(summary)

View file

@ -29,7 +29,7 @@ option('bindings',
option('tools', option('tools',
type: 'array', type: 'array',
choices: ['', 'svg2tvg', 'svg2png'], choices: ['', 'svg2tvg', 'svg2png', 'all'],
value: [''], value: [''],
description: 'Enable building thorvg tools') description: 'Enable building thorvg tools')

View file

@ -1,8 +1,8 @@
if get_option('tools').contains('svg2png') == true if all_tools or get_option('tools').contains('svg2png') == true
subdir('svg2png') subdir('svg2png')
endif endif
if get_option('tools').contains('svg2tvg') == true if all_tools or get_option('tools').contains('svg2tvg') == true
subdir('svg2tvg') subdir('svg2tvg')
endif endif