Skip to content

Commit

Permalink
Update to automatically find VCPKG_DIR
Browse files Browse the repository at this point in the history
  • Loading branch information
gwaldron committed Aug 2, 2024
1 parent a83fe7d commit e9678bf
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion bootstrap-vcpkg.bat
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,15 @@
setlocal
set ERROR_MSG=

if "%VCPKG_DIR%" == "" (
FOR /F "tokens=*" %%X IN ('where vcpkg.exe') do (SET VCPKG_DIR=%%~dpX)
)

:: Verify vcpkg is available
set VCPKG_TOOLCHAIN_FILE=%VCPKG_DIR%\scripts\buildsystems\vcpkg.cmake

if not exist %VCPKG_TOOLCHAIN_FILE% (
set ERROR_MSG=Please set the VCPKG_DIR environment variable to your vcpkg install location
set ERROR_MSG=Cannot find vcpkg. Please ensure vcpkg.exe is in your PATH, or set the VCPKG_DIR environment variable to your vcpkg install location
goto :usage
)

Expand Down Expand Up @@ -51,6 +55,7 @@ call :realpath !-I!
set INSTALL_DIR=%RETVAL%

:: Ask for confirmation:
echo VCPKG_DIR = %VCPKG_DIR%
echo Source location = %SOURCE_DIR%
echo Build location = %BUILD_DIR%
echo Install location = %INSTALL_DIR%
Expand Down

0 comments on commit e9678bf

Please sign in to comment.