Fail with error code if install_vcpkg_dependencies.bat commands fail

This commit is contained in:
MACHIZAUD Andréa 2022-06-18 17:15:28 +02:00
parent 84319911c5
commit 087e1d8036
1 changed files with 6 additions and 3 deletions

View File

@ -1,14 +1,17 @@
@echo off
setlocal
pushd %~dp0
REM get vcpkg distribution
if not exist vcpkg git clone https://github.com/Microsoft/vcpkg.git
if not exist vcpkg git clone https://github.com/Microsoft/vcpkg.git || exit /b 1
REM build vcpkg
if not exist vcpkg\vcpkg.exe call vcpkg\bootstrap-vcpkg.bat -disableMetrics
if not exist vcpkg\vcpkg.exe call vcpkg\bootstrap-vcpkg.bat -disableMetrics || exit /b 2
set VCPKG_ROOT=%cd%\vcpkg
REM install required packages
vcpkg\vcpkg.exe install --triplet x64-windows-static
vcpkg\vcpkg.exe install --triplet x64-windows-static || exit /b 3
popd