From a815bf9b1f5ccde3a84828ebcdaa3b572fa0a570 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Sat, 10 Sep 2022 03:24:41 +0300 Subject: [PATCH 51/51] Meson: Add sys-tolua-cmd option See osdn #45612 Signed-off-by: Marko Lindqvist --- doc/INSTALL.meson | 7 +++++++ meson.build | 2 +- meson_options.txt | 5 +++++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/doc/INSTALL.meson b/doc/INSTALL.meson index 21ef3bbd12..162ac2064d 100644 --- a/doc/INSTALL.meson +++ b/doc/INSTALL.meson @@ -129,6 +129,13 @@ syslua ('try'/'true'/'false') source tree. The default is 'try' to use lua from the system if possible, but fallback to using freeciv's included one if not found from system. +sys-tolua-cmd (boolean): + Whether to use tolua command from the system, or to build one + included in the freeciv source tree. For native build + the default is false, i.e., to use freeciv's own tolua. + When cross-compiling, this setting is ignored, and tolua is + always used from the build system. + mwand ('try'/'true'/'false') Whether to build against MagickWand to have support for additional mapimg formats. The default is 'try' to enable the support if possible. diff --git a/meson.build b/meson.build index 544dcebede..4c15804cad 100644 --- a/meson.build +++ b/meson.build @@ -670,7 +670,7 @@ fc_deps = static_library('fc_dependencies', dependencies: lua_dep ) -if meson.is_cross_build() +if meson.is_cross_build() or get_option('sys-tolua-cmd') tolua_cmd = find_program('tolua') else tolua_cmd = executable('tolua', diff --git a/meson_options.txt b/meson_options.txt index cd3813d0d9..f0bb4331b9 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -30,6 +30,11 @@ option('syslua', choices: ['try', 'true', 'false'], description: 'Use lua from system') +option('sys-tolua-cmd', + type: 'boolean', + value: false, + description: 'Use tolua cmd from the system even for native builds') + option('mwand', type: 'combo', choices: ['try', 'true', 'false'], -- 2.35.1