summaryrefslogtreecommitdiff
path: root/tools/meson-build.sh
blob: 304a7556763646b63488ac3eef9072702e75517e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/sh
set -eux

src="$1"
dst="$2"
target="$3"
options="$4"

[ -d "$dst" ] || meson "$src" "$dst" $options

# Locate ninja binary, on CentOS 7 it is called ninja-build, so
# use that name if available.
ninja=ninja
if which ninja-build >/dev/null 2>&1 ; then
    ninja=ninja-build
fi

"$ninja" -C "$dst" "$target"