From e8e49eee1f6ca145c860258e1e46702418e262fc Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Fri, 22 Sep 2023 14:38:54 +0300 Subject: [PATCH 21/21] Meson: Replace boolean 'ruledit' option with 'tools' array See osdn #48700 Signed-off-by: Marko Lindqvist --- doc/INSTALL.meson | 6 ++++-- meson.build | 4 ++-- meson_options.txt | 9 +++++---- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/doc/INSTALL.meson b/doc/INSTALL.meson index 3202b36922..91092f7fd9 100644 --- a/doc/INSTALL.meson +++ b/doc/INSTALL.meson @@ -150,8 +150,10 @@ readline ('try'/'true'/'false') audio (boolean): Build sound support to the clients. Defaults to true. -ruledit (boolean): - Build ruleset editor. Defaults to true. +tools (array): + Extra tools to build: + * ruledit : Ruleset editor + Default is to build them all. nls (boolean): Build in Native Language Support. Defaults to true. diff --git a/meson.build b/meson.build index b01e924b89..4bc117c207 100644 --- a/meson.build +++ b/meson.build @@ -5,7 +5,7 @@ c_compiler = meson.get_compiler('c') b_root = meson.project_build_root() -if get_option('ruledit') or \ +if get_option('tools').contains('ruledit') or \ get_option('clients').contains('qt') or \ get_option('fcmp').contains('qt') add_languages('cpp', native: false) @@ -4093,7 +4093,7 @@ executable('freeciv-ruleup', install: true ) -if get_option('ruledit') +if get_option('tools').contains('ruledit') if not qt_dep.found() if qtver == 'qt6' or qtver == 'qt6x' diff --git a/meson_options.txt b/meson_options.txt index 40134d50d8..83500a504c 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -50,10 +50,11 @@ option('audio', value: true, description: 'Build in sound support') -option('ruledit', - type: 'boolean', - value: true, - description: 'Build ruleset editor') +option('tools', + type: 'array', + choices: ['ruledit'], + value: ['ruledit'], + description: 'Extra tools to build') option('nls', type: 'boolean', -- 2.40.1