blob: 01cf11175e67ae7af067263c80b3c18f4b5f02ba [file] [log] [blame]
Mark Young1aacfe12016-01-28 14:39:19 -07001echo off
2REM
3REM This batch file builds both 32-bit and 64-bit versions of the loader.
4REM It is assumed that the developer has run the update_external_sources.bat
5REM file prior to running this.
6REM
7
8REM Determine the appropriate CMake strings for the current version of Visual Studio
9echo Determining VS version
10python .\determine_vs_version.py > vsversion.tmp
11set /p VS_VERSION=< vsversion.tmp
12echo Detected Visual Studio Version as %VS_VERSION%
13
14REM Cleanup the file we used to collect the VS version output since it's no longer needed.
15del /Q /F vsversion.tmp
16
17rmdir /Q /S build
18rmdir /Q /S build32
19
20REM *******************************************
Jon Ashburn49ba27b2016-01-31 10:22:36 -070021REM 64-bit LoaderAndTools build
Mark Young1aacfe12016-01-28 14:39:19 -070022REM *******************************************
23mkdir build
24pushd build
25
26echo Generating 64-bit spirv-tools CMake files for Visual Studio %VS_VERSION%
27cmake -G "Visual Studio %VS_VERSION% Win64" ..
28
Jon Ashburn49ba27b2016-01-31 10:22:36 -070029echo Building 64-bit Debug LoaderAndTools
Mark Young3f3b24a2016-02-01 14:51:13 -070030msbuild ALL_BUILD.vcxproj /p:Platform=x64 /p:Configuration=Debug /verbosity:quiet
Mark Young1aacfe12016-01-28 14:39:19 -070031
32REM Check for existence of one DLL, even though we should check for all results
33if not exist .\loader\Debug\vulkan-1.dll (
34 echo.
Jon Ashburn49ba27b2016-01-31 10:22:36 -070035 echo LoaderAndTools 64-bit Debug build failed!
Mark Young1aacfe12016-01-28 14:39:19 -070036 set errorCode=1
37)
38
Jon Ashburn49ba27b2016-01-31 10:22:36 -070039echo Building 64-bit Release LoaderAndTools
Mark Young3f3b24a2016-02-01 14:51:13 -070040msbuild ALL_BUILD.vcxproj /p:Platform=x64 /p:Configuration=Release /verbosity:quiet
Mark Young1aacfe12016-01-28 14:39:19 -070041
42REM Check for existence of one DLL, even though we should check for all results
43if not exist .\loader\Release\vulkan-1.dll (
44 echo.
Jon Ashburn49ba27b2016-01-31 10:22:36 -070045 echo LoaderAndTools 64-bit Release build failed!
Mark Young1aacfe12016-01-28 14:39:19 -070046 set errorCode=1
47)
48
49popd
50
51REM *******************************************
Jon Ashburn49ba27b2016-01-31 10:22:36 -070052REM 32-bit LoaderAndTools build
Mark Young1aacfe12016-01-28 14:39:19 -070053REM *******************************************
54mkdir build32
55pushd build32
56
Jon Ashburn49ba27b2016-01-31 10:22:36 -070057echo Generating 32-bit LoaderAndTools CMake files for Visual Studio %VS_VERSION%
Mark Young1aacfe12016-01-28 14:39:19 -070058cmake -G "Visual Studio %VS_VERSION%" ..
59
Jon Ashburn49ba27b2016-01-31 10:22:36 -070060echo Building 32-bit Debug LoaderAndTools
Mark Young3f3b24a2016-02-01 14:51:13 -070061msbuild ALL_BUILD.vcxproj /p:Platform=x86 /p:Configuration=Debug /verbosity:quiet
Mark Young1aacfe12016-01-28 14:39:19 -070062
63REM Check for existence of one DLL, even though we should check for all results
64if not exist .\loader\Debug\vulkan-1.dll (
65 echo.
Jon Ashburn49ba27b2016-01-31 10:22:36 -070066 echo LoaderAndTools 32-bit Debug build failed!
Mark Young1aacfe12016-01-28 14:39:19 -070067 set errorCode=1
68)
69
Jon Ashburn49ba27b2016-01-31 10:22:36 -070070echo Building 32-bit Release LoaderAndTools
Mark Young3f3b24a2016-02-01 14:51:13 -070071msbuild ALL_BUILD.vcxproj /p:Platform=x86 /p:Configuration=Release /verbosity:quiet
Mark Young1aacfe12016-01-28 14:39:19 -070072
73REM Check for existence of one DLL, even though we should check for all results
74if not exist .\loader\Release\vulkan-1.dll (
75 echo.
Jon Ashburn49ba27b2016-01-31 10:22:36 -070076 echo LoaderAndTools 32-bit Release build failed!
Mark Young1aacfe12016-01-28 14:39:19 -070077 set errorCode=1
78)
79
80popd
81