diff options
| author | xyb <xyb@xyb.name> | 2020-09-05 10:45:48 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-09-05 10:45:48 -0700 |
| commit | fdac1fc5aa36e8edeb9f358f0fad041de2626215 (patch) | |
| tree | 56cdf5ea8aa709b27b2ea8c989af3c0b3f000117 /scripts/bootstrap.sh | |
| parent | bd8af0789804dad0f76dced3f837845f086350c5 (diff) | |
| download | vcpkg-fdac1fc5aa36e8edeb9f358f0fad041de2626215.tar.gz vcpkg-fdac1fc5aa36e8edeb9f358f0fad041de2626215.zip | |
Add community triple arm64-linux and arm-linux. (#11880)
Verify the following command on both 32 bits and 64 bits OS on Raspberry pi 3.
./bootstrap-vcpkg.sh
./vcpkg install boost
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 |
