forked from LunarG/VulkanSamples
-
Notifications
You must be signed in to change notification settings - Fork 8
/
build_windows_samples_sdk.bat
54 lines (46 loc) · 1.61 KB
/
build_windows_samples_sdk.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
echo off
:: Check that cmake is configured
where cmake.exe > nul 2>&1
if not %errorlevel% equ 0 (
echo ERROR: CMake was not found. Please install CMake or put cmake.exe in your PATH.
exit /b 1
)
where msbuild.exe > nul 2>&1
if not %errorlevel% equ 0 (
echo ERROR: MSBuild was not found. Please use a visual studio developer console, or put MSBuild.exe in your PATH.
exit /b 1
)
:: Get the version of msbuild
set cmd="msbuild /version | findstr /rxc:"[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*""
for /f "tokens=1* delims=." %%i in ('%cmd%') do set msbuild_version=%%i
if %msbuild_version% lss 12 (
echo ERROR: MSBuild must be at least version 12 ^(Visual Studio 2013^). Found version %msbuild_version%.
exit /b 1
)
set version_string=Visual Studio %msbuild_version% Win64
set START_DIR=%CD%
cd %VULKAN_SDK%
:: Build glslang
cd glslang
md build
cd build
cmake -G "%version_string%" ..
msbuild ALL_BUILD.vcxproj /p:Platform=x64 /p:Configuration=Debug /verbosity:quiet
msbuild ALL_BUILD.vcxproj /p:Platform=x64 /p:Configuration=Release /verbosity:quiet
cd ..\..
:: Build spirv-tools
cd spirv-tools
md build
cd build
cmake -G "%version_string%" ..
msbuild ALL_BUILD.vcxproj /p:Platform=x64 /p:Configuration=Debug /verbosity:quiet
msbuild ALL_BUILD.vcxproj /p:Platform=x64 /p:Configuration=Release /verbosity:quiet
cd ..\..
:: Build samples
cd samples
md build
cd build
cmake -G "%version_string%" ..
msbuild ALL_BUILD.vcxproj /p:Platform=x64 /p:Configuration=Debug /verbosity:quiet
msbuild ALL_BUILD.vcxproj /p:Platform=x64 /p:Configuration=Release /verbosity:quiet
cd %START_DIR%