@@ -8,24 +8,31 @@ git submodule update -f "tools/vcpkg"
88Push-Location - Path " tools/vcpkg"
99$VCPKG_DIR = (Get-Item - Path " .\" ).FullName
1010
11- $TripletsDir = Join-Path $VCPKG_DIR " ..\triplets"
12- $TripletOptions = " --overlay-triplets=$TripletsDir --triplet=x64-windows-debug-only"
13-
1411./ bootstrap-vcpkg.bat
1512./ vcpkg integrate install
1613
14+ $buildType = $env: VCPKG_BUILD_TYPE
15+ if ($buildType ) {
16+ Write-Host " Using build type: $buildType "
17+ $VCPKG_BUILD_TYPE_ARG = " -DVCPKG_BUILD_TYPE=$buildType "
18+ } else {
19+ Write-Host " No build type provided; using default multi-config build."
20+ $VCPKG_BUILD_TYPE_ARG = " "
21+ }
22+
1723# Google Benchmark
18- ./ vcpkg " --vcpkg-root=$VCPKG_DIR " install benchmark:x64- windows $TripletOptions
24+ ./ vcpkg " --vcpkg-root=$VCPKG_DIR " install benchmark:x64- windows -- x - cmake - args = " $VCPKG_BUILD_TYPE_ARG "
1925
2026# Google Test
21- ./ vcpkg " --vcpkg-root=$VCPKG_DIR " install gtest:x64- windows $TripletOptions
27+ ./ vcpkg " --vcpkg-root=$VCPKG_DIR " install gtest:x64- windows -- x - cmake - args = " $VCPKG_BUILD_TYPE_ARG "
2228
2329# nlohmann-json
24- ./ vcpkg " --vcpkg-root=$VCPKG_DIR " install nlohmann- json:x64- windows $TripletOptions
30+ ./ vcpkg " --vcpkg-root=$VCPKG_DIR " install nlohmann- json:x64- windows -- x - cmake - args = " $VCPKG_BUILD_TYPE_ARG "
2531
2632# grpc with custom CMake arguments
27- ./ vcpkg " --vcpkg-root=$VCPKG_DIR " install grpc:x64- windows $TripletOptions `
28- -- x- cmake- args= " -DgRPC_INSTALL=ON `
33+ ./ vcpkg " --vcpkg-root=$VCPKG_DIR " install grpc:x64- windows `
34+ -- x- cmake- args= " $VCPKG_BUILD_TYPE_ARG `
35+ -DgRPC_INSTALL=ON `
2936 -DgRPC_BUILD_TESTS=OFF `
3037 -DgRPC_BUILD_GRPC_CPP_PLUGIN=ON `
3138 -DgRPC_BUILD_GRPC_CSHARP_PLUGIN=OFF `
@@ -37,9 +44,9 @@ $TripletOptions = "--overlay-triplets=$TripletsDir --triplet=x64-windows-debug-o
3744 -DgRPC_BUILD_GRPCPP_OTEL_PLUGIN=OFF"
3845
3946# curl
40- ./ vcpkg " --vcpkg-root=$VCPKG_DIR " install curl:x64- windows $TripletOptions
47+ ./ vcpkg " --vcpkg-root=$VCPKG_DIR " install curl:x64- windows -- x - cmake - args = " $VCPKG_BUILD_TYPE_ARG "
4148
4249# prometheus-cpp
43- ./ vcpkg " --vcpkg-root=$VCPKG_DIR " install prometheus- cpp:x64- windows $TripletOptions
50+ ./ vcpkg " --vcpkg-root=$VCPKG_DIR " install prometheus- cpp:x64- windows -- x - cmake - args = " $VCPKG_BUILD_TYPE_ARG "
4451
4552Pop-Location
0 commit comments