Skip to content

Instantly share code, notes, and snippets.

@ShinNoNoir
Created October 5, 2017 07:30
Show Gist options
  • Save ShinNoNoir/454ffdbc798861e2b016ac0af25c45ab to your computer and use it in GitHub Desktop.
Save ShinNoNoir/454ffdbc798861e2b016ac0af25c45ab to your computer and use it in GitHub Desktop.
vcpkg utility: set environment vars
@ECHO OFF
set VCPKGROOT=%~dp0
echo VCPKGROOT=%VCPKGROOT%
set TOOLCHAIN=%VCPKGROOT%scripts\buildsystems\vcpkg.cmake
echo TOOLCHAIN=%TOOLCHAIN%
FOR /D %%F IN (%VCPKGROOT%\downloads\cmake-*) DO (
set CMAKEDIR=%%F\bin
goto break
)
:break
echo CMAKEDIR=%CMAKEDIR%
set PATH=%PATH%;%CMAKEDIR%
echo.
echo Use: cmake -DCMAKE_TOOLCHAIN_FILE=%%TOOLCHAIN%%
echo.
@ShinNoNoir
Copy link
Author

Intended usage: Place env.bat in vcpkg's root.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment