From f4d284df2af172372141504518552a8a0626376c Mon Sep 17 00:00:00 2001 From: Hermet Park Date: Wed, 13 Oct 2021 20:24:21 +0900 Subject: [PATCH] infra: add "all" option for tools. just for developer convenience. --- meson.build | 12 ++++++++++-- meson_options.txt | 2 +- src/bin/meson.build | 4 ++-- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/meson.build b/meson.build index 758bad33..d1b2d865 100644 --- a/meson.build +++ b/meson.build @@ -67,6 +67,14 @@ if get_option('log') == true config_h.set10('THORVG_LOG_ENABLED', true) endif + +all_tools = false + +if get_option('tools').contains('all') == true + all_tools = true +endif + + configure_file( output: 'config.h', configuration: config_h @@ -118,8 +126,8 @@ Summary: get_option('log'), get_option('tests'), get_option('examples'), - get_option('tools').contains('svg2tvg'), - get_option('tools').contains('svg2png'), + all_tools or get_option('tools').contains('svg2tvg'), + all_tools or get_option('tools').contains('svg2png'), ) message(summary) diff --git a/meson_options.txt b/meson_options.txt index 64b912ac..25537cce 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -29,7 +29,7 @@ option('bindings', option('tools', type: 'array', - choices: ['', 'svg2tvg', 'svg2png'], + choices: ['', 'svg2tvg', 'svg2png', 'all'], value: [''], description: 'Enable building thorvg tools') diff --git a/src/bin/meson.build b/src/bin/meson.build index 1c6dd04e..0cec9840 100644 --- a/src/bin/meson.build +++ b/src/bin/meson.build @@ -1,8 +1,8 @@ -if get_option('tools').contains('svg2png') == true +if all_tools or get_option('tools').contains('svg2png') == true subdir('svg2png') endif -if get_option('tools').contains('svg2tvg') == true +if all_tools or get_option('tools').contains('svg2tvg') == true subdir('svg2tvg') endif