Skip to content

Instantly share code, notes, and snippets.

@ousttrue
Created December 11, 2017 09:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ousttrue/535a2e2c3b7c1fa53b98bd3f69fd71af to your computer and use it in GitHub Desktop.
Save ousttrue/535a2e2c3b7c1fa53b98bd3f69fd71af to your computer and use it in GitHub Desktop.
cmake for UWP
@echo off
FOR /F "TOKENS=1,2,*" %%A IN ('reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VS7" /v "15.0"') DO IF "%%A"=="15.0" SET VSPATH=%%C
@echo on
set CMAKE="%VSPATH%\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe"
set BUILD_DIR="build_vs2017_uwp_x86"
if not exist %BUILD_DIR% mkdir %BUILD_DIR%
pushd %BUILD_DIR%
%CMAKE% -G "Visual Studio 15 2017" -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION=10.0 ..
popd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment