Debian Codegraph @

debian/rust-vendor/vcpkg/setup_vcp.sh

raw
1 #!/bin/bash
2 #
3 # This script can be sourced to ensure VCPKG_ROOT points at a bootstrapped vcpkg repository.
4 # It will also modify the environment (if sourced) to reflect any overrides in
5 # vcpkg triplet used neccesary to match the semantics of vcpkg-rs.
6
7 if [ "$VCPKG_ROOT" == "" ]; then
8 echo "VCPKG_ROOT must be set."
9 exit 1
10 fi
11
12 # Bootstrap ./vcp if it doesn't already exist.
13 if [ ! -d "$VCPKG_ROOT" ]; then
14 echo "Bootstrapping ./vcp for systest"
15 pushd ..
16 git clone https://github.com/microsoft/vcpkg.git vcp
17 cd vcp
18 if [ "$OS" == "Windows_NT" ]; then
19 ./bootstrap-vcpkg.bat
20 else
21 ./bootstrap-vcpkg.sh
22 fi
23
24 popd
25 fi
26
27 # Override triplet used if we are on Windows, as the default there is 32bit
28 # dynamic, whereas on 64 bit vcpkg-rs will prefer static with dynamic CRT
29 # linking.
30 if [ "$OS" == "Windows_NT" -a "$PROCESSOR_ARCHITECTURE" == "AMD64" ] ; then
31 export VCPKG_DEFAULT_TRIPLET=x64-windows-static-md
32 fi