diff options
Diffstat (limited to 'scripts/bootstrap.sh')
| -rw-r--r-- | scripts/bootstrap.sh | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/scripts/bootstrap.sh b/scripts/bootstrap.sh index 321a16e05..46f695864 100644 --- a/scripts/bootstrap.sh +++ b/scripts/bootstrap.sh @@ -79,6 +79,16 @@ vcpkgCheckRepoTool() fi } +vcpkgCheckBuildTool() +{ + __tool=$1 + if ! command -v "$__tool" >/dev/null 2>&1 ; then + echo "Could not find $__tool. Please install it (and other dependencies) with:" + echo "sudo apt-get install cmake ninja-build" + exit 1 + fi +} + vcpkgCheckEqualFileHash() { url=$1; filePath=$2; expectedHash=$3 @@ -226,10 +236,18 @@ selectCXX() # Preparation UNAME="$(uname)" +ARCH="$(uname -m)" + +# Force using system utilities for building vcpkg if host arch is arm or arm64. +if [ "$ARCH" = "armv7l" -o "$ARCH" = "aarch64" ]; then + vcpkgUseSystem=true +fi if $vcpkgUseSystem; then cmakeExe="cmake" ninjaExe="ninja" + vcpkgCheckBuildTool "$cmakeExe" + vcpkgCheckBuildTool "$ninjaExe" else fetchTool "cmake" "$UNAME" cmakeExe || exit 1 fetchTool "ninja" "$UNAME" ninjaExe || exit 1 |
