diff options
Diffstat (limited to 'tools/meson-build.sh')
-rwxr-xr-x | tools/meson-build.sh | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tools/meson-build.sh b/tools/meson-build.sh new file mode 100755 index 0000000..ecd558f --- /dev/null +++ b/tools/meson-build.sh @@ -0,0 +1,22 @@ +#!/bin/sh +# SPDX-License-Identifier: LGPL-2.1-or-later +set -eux + +src="$1" +dst="$2" +target="$3" +options="$4" +CC="$5" +CXX="$6" + +# shellcheck disable=SC2086 +[ -f "$dst/ninja.build" ] || CC="$CC" CXX="$CXX" meson "$src" "$dst" $options + +# Locate ninja binary, on CentOS 7 it is called ninja-build, so +# use that name if available. +ninja="ninja" +if command -v ninja-build >/dev/null ; then + ninja="ninja-build" +fi + +"$ninja" -C "$dst" "$target" |