summaryrefslogtreecommitdiffstats
path: root/src/jaegertracing/opentelemetry-cpp/tools/build-vcpkg.sh
blob: f4acb009fe5eabf49eb794349f1f3caa01793d14 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/bash
export PATH=/usr/local/bin:$PATH
DIR="$(
  cd "$(dirname "$0")" >/dev/null 2>&1
  pwd -P
)"
WORKSPACE_ROOT=$DIR/..

export VCPKG_ROOT=$WORKSPACE_ROOT/tools/vcpkg
export PATH=$VCPKG_ROOT:$PATH

if [[ ! -f $DIR/vcpkg/vcpkg ]]; then
  pushd $DIR/vcpkg
  ./bootstrap-vcpkg.sh
  popd
fi

vcpkg "--vcpkg-root=$VCPKG_ROOT" install gtest
vcpkg "--vcpkg-root=$VCPKG_ROOT" install benchmark
vcpkg "--vcpkg-root=$VCPKG_ROOT" install ms-gsl
vcpkg "--vcpkg-root=$VCPKG_ROOT" install nlohmann-json
vcpkg "--vcpkg-root=$VCPKG_ROOT" install abseil
vcpkg "--vcpkg-root=$VCPKG_ROOT" install protobuf

cd $WORKSPACE_ROOT
export USE_VCPKG=1
./tools/build.sh ${1-nostd} ${2--DCMAKE_TOOLCHAIN_FILE=$WORKSPACE_ROOT/tools/vcpkg/scripts/buildsystems/vcpkg.cmake}