2 REM Update source for glslang, LunarGLASS, spirv-tools
\r
4 REM Determine the appropriate CMake strings for the current version of Visual Studio
\r
5 echo Determining VS version
\r
6 python .\determine_vs_version.py > vsversion.tmp
\r
7 set /p VS_VERSION=< vsversion.tmp
\r
8 echo Detected Visual Studio Version as %VS_VERSION%
\r
10 REM Cleanup the file we used to collect the VS version output since it's no longer needed.
\r
11 del /Q /F vsversion.tmp
\r
13 REM Determine if SVN exists, this is a requirement for LunarGLASS
\r
15 for %%X in (svn.exe) do (set FOUND=%%~$PATH:X)
\r
20 setlocal EnableDelayedExpansion
\r
23 set BASE_DIR=%BUILD_DIR%..
\r
24 set GLSLANG_DIR=%BASE_DIR%\glslang
\r
25 set LUNARGLASS_DIR=%BASE_DIR%\LunarGLASS
\r
26 set SPIRV_TOOLS_DIR=%BASE_DIR%\spirv-tools
\r
28 REM // ======== Parameter parsing ======== //
\r
31 echo usage: update_external_sources.bat [options]
\r
33 echo Available options:
\r
34 echo --sync-glslang just pull glslang_revision
\r
35 echo --sync-LunarGLASS just pull LunarGLASS_revision
\r
36 echo --sync-spirv-tools just pull spirv-tools_revision
\r
37 echo --build-glslang pulls glslang_revision, configures CMake, builds Release and Debug
\r
38 echo --build-LunarGLASS pulls LunarGLASS_revision, configures CMake, builds Release and Debug
\r
39 echo --build-spirv-tools pulls spirv-tools_revision, configures CMake, builds Release and Debug
\r
40 echo --all sync and build glslang, LunarGLASS, spirv-tools
\r
45 set sync-LunarGLASS=0
\r
46 set sync-spirv-tools=0
\r
48 set build-LunarGLASS=0
\r
49 set build-spirv-tools=0
\r
50 set check-glslang-build-dependencies=0
\r
51 set check-LunarGLASS-fetch-dependencies=0
\r
52 set check-LunarGLASS-build-dependencies=0
\r
56 if "%1"=="" goto:parameterContinue
\r
58 if "%1" == "--sync-glslang" (
\r
64 if "%1" == "--sync-LunarGLASS" (
\r
65 set sync-LunarGLASS=1
\r
66 set check-LunarGLASS-fetch-dependencies=1
\r
71 if "%1" == "--sync-spirv-tools" (
\r
72 set sync-spirv-tools=1
\r
77 if "%1" == "--build-glslang" (
\r
79 set check-glslang-build-dependencies=1
\r
85 if "%1" == "--build-LunarGLASS" (
\r
86 set sync-LunarGLASS=1
\r
87 set check-LunarGLASS-fetch-dependencies=1
\r
88 set check-LunarGLASS-build-dependencies=1
\r
89 set build-LunarGLASS=1
\r
94 if "%1" == "--build-spirv-tools" (
\r
95 set sync-spirv-tools=1
\r
96 REM glslang has the same needs as spirv-tools
\r
97 set check-glslang-build-dependencies=1
\r
98 set build-spirv-tools=1
\r
103 if "%1" == "--all" (
\r
105 set sync-spirv-tools=1
\r
106 set build-glslang=1
\r
107 set build-spirv-tools=1
\r
108 set check-glslang-build-dependencies=1
\r
110 REM Only attempt to build LunarGLASS if we find SVN
\r
111 if %SVN_EXE_FOUND% equ 1 (
\r
112 set sync-LunarGLASS=1
\r
113 set build-LunarGLASS=1
\r
114 set check-LunarGLASS-fetch-dependencies=1
\r
115 set check-LunarGLASS-build-dependencies=1
\r
121 echo Unrecognized options "%1"
\r
126 REM // ======== end Parameter parsing ======== //
\r
129 REM // ======== Dependency checking ======== //
\r
130 REM git is required for all paths
\r
131 for %%X in (git.exe) do (set FOUND=%%~$PATH:X)
\r
132 if not defined FOUND (
\r
133 echo Dependency check failed:
\r
134 echo git.exe not found
\r
135 echo Git for Windows can be downloaded here: https://git-scm.com/download/win
\r
136 echo Install and ensure git.exe makes it into your PATH
\r
140 if %check-LunarGLASS-fetch-dependencies% equ 1 (
\r
141 if %SVN_EXE_FOUND% equ 0 (
\r
142 echo Dependency check failed:
\r
143 echo svn.exe not found
\r
144 echo Get Subversion for Windows here: http://sourceforge.net/projects/win32svn/
\r
145 echo Install and ensure svn.exe makes it into your PATH, default is "C:\Program Files (x86)\Subversion\bin"
\r
149 for %%X in (wget.exe) do (set FOUND=%%~$PATH:X)
\r
150 if not defined FOUND (
\r
151 echo Dependency check failed:
\r
152 echo wget.exe not found
\r
153 echo Get wget for Windows here: http://gnuwin32.sourceforge.net/packages/wget.htm
\r
154 echo Easiest to select "Complete package, except sources" link which will install and setup PATH
\r
155 echo Install and ensure each makes it into your PATH, default is "C:\Program Files (x86)\GnuWin32\bin"
\r
159 for %%X in (gzip.exe) do (set FOUND=%%~$PATH:X)
\r
160 if not defined FOUND (
\r
161 echo Dependency check failed:
\r
162 echo gzip.exe not found
\r
163 echo Get gzip for Windows here: http://gnuwin32.sourceforge.net/packages/gzip.htm
\r
164 echo Easiest to select "Complete package, except sources" link which will install and setup PATH
\r
165 echo Install and ensure each makes it into your PATH, default is "C:\Program Files (x86)\GnuWin32\bin"
\r
169 for %%X in (tar.exe) do (set FOUND=%%~$PATH:X)
\r
170 if not defined FOUND (
\r
171 echo Dependency check failed:
\r
172 echo tar.exe not found
\r
173 echo Get tar for Windows here: http://gnuwin32.sourceforge.net/packages/gtar.htm
\r
174 echo Easiest to select Binaries/Setup link which will install and setup PATH
\r
175 echo Install and ensure each makes it into your PATH, default is "C:\Program Files (x86)\GnuWin32\bin"
\r
180 if %check-glslang-build-dependencies% equ 1 (
\r
181 for %%X in (cmake.exe) do (set FOUND=%%~$PATH:X)
\r
182 if not defined FOUND (
\r
183 echo Dependency check failed:
\r
184 echo cmake.exe not found
\r
185 echo Get CNake 2.8 for Windows here: http://www.cmake.org/cmake/resources/software.html
\r
186 echo Install and ensure each makes it into your PATH, default is "C:\Program Files (x86)\CMake\bin"
\r
191 if %check-LunarGLASS-build-dependencies% equ 1 (
\r
192 for %%X in (python.exe) do (set FOUND=%%~$PATH:X)
\r
193 if not defined FOUND (
\r
194 echo Dependency check failed:
\r
195 echo python.exe not found
\r
196 echo Get python 2.7x for Windows here: http://www.python.org/download/releases/2.7.6/
\r
197 echo Install and ensure each makes it into your PATH, default is "C:\Python27"
\r
201 for %%X in (cmake.exe) do (set FOUND=%%~$PATH:X)
\r
202 if not defined FOUND (
\r
203 echo Dependency check failed:
\r
204 echo cmake.exe not found
\r
205 echo Get CNake 2.8 for Windows here: http://www.cmake.org/cmake/resources/software.html
\r
206 echo Install and ensure each makes it into your PATH, default is "C:\Program Files (x86)\CMake\bin"
\r
213 REM // ======== end Dependency checking ======== //
\r
217 if %errorCode% neq 0 (goto:error)
\r
219 REM Read the target versions from external file, which is shared with Linux script
\r
220 if not exist LunarGLASS_revision (
\r
222 echo Missing LunarGLASS_revision file! Place it next to this script with target version in it.
\r
227 if not exist glslang_revision (
\r
229 echo Missing glslang_revision file! Place it next to this script with target version in it.
\r
234 if not exist spirv-tools_revision (
\r
236 echo Missing spirv-tools_revision file! Place it next to this script with target version in it.
\r
241 set /p LUNARGLASS_REVISION= < LunarGLASS_revision
\r
242 set /p GLSLANG_REVISION= < glslang_revision
\r
243 set /p SPIRV_TOOLS_REVISION= < spirv-tools_revision
\r
244 echo LUNARGLASS_REVISION=%LUNARGLASS_REVISION%
\r
245 echo GLSLANG_REVISION=%GLSLANG_REVISION%
\r
246 echo SPIRV_TOOLS_REVISION=%SPIRV_TOOLS_REVISION%
\r
248 set /p LUNARGLASS_REVISION_R32= < LunarGLASS_revision_R32
\r
249 echo LUNARGLASS_REVISION_R32=%LUNARGLASS_REVISION_R32%
\r
251 echo Creating and/or updating glslang, LunarGLASS, spirv-tools in %BASE_DIR%
\r
253 if %sync-glslang% equ 1 (
\r
254 rd /S /Q %GLSLANG_DIR%
\r
255 if not exist %GLSLANG_DIR% (
\r
256 call:create_glslang
\r
258 if %errorCode% neq 0 (goto:error)
\r
259 call:update_glslang
\r
260 if %errorCode% neq 0 (goto:error)
\r
263 if %sync-LunarGLASS% equ 1 (
\r
264 rd /S /Q %LUNARGLASS_DIR%
\r
265 if not exist %LUNARGLASS_DIR% (
\r
266 call:create_LunarGLASS
\r
268 if %errorCode% neq 0 (goto:error)
\r
269 call:update_LunarGLASS
\r
270 if %errorCode% neq 0 (goto:error)
\r
273 if %sync-spirv-tools% equ 1 (
\r
274 rd /S /Q %SPIRV_TOOLS_DIR%
\r
275 if %errorlevel% neq 0 (goto:error)
\r
276 if not exist %SPIRV_TOOLS_DIR% (
\r
277 call:create_spirv-tools
\r
279 if %errorCode% neq 0 (goto:error)
\r
280 call:update_spirv-tools
\r
281 if %errorCode% neq 0 (goto:error)
\r
284 if %build-glslang% equ 1 (
\r
286 if %errorCode% neq 0 (goto:error)
\r
289 if %build-LunarGLASS% equ 1 (
\r
290 call:build_LunarGLASS
\r
291 if %errorCode% neq 0 (goto:error)
\r
294 if %build-spirv-tools% equ 1 (
\r
295 call:build_spirv-tools
\r
296 if %errorCode% neq 0 (goto:error)
\r
305 echo Halting due to error
\r
309 if not "%cd%\" == "%BUILD_DIR%" ( cd %BUILD_DIR% )
\r
315 REM // ======== Functions ======== //
\r
319 echo Creating local glslang repository %GLSLANG_DIR%)
\r
320 mkdir %GLSLANG_DIR%
\r
322 git clone git@gitlab.khronos.org:GLSL/glslang.git .
\r
323 git checkout %GLSLANG_REVISION%
\r
324 if not exist %GLSLANG_DIR%\SPIRV (
\r
325 echo glslang source download failed!
\r
332 echo Updating %GLSLANG_DIR%
\r
335 git checkout %GLSLANG_REVISION%
\r
339 REM Windows complains if it can't find the directory below, no need to call
\r
340 REM rd /S /Q %LUNARGLASS_DIR%
\r
342 echo Creating local LunarGLASS repository %LUNARGLASS_DIR%)
\r
343 mkdir %LUNARGLASS_DIR%
\r
344 cd %LUNARGLASS_DIR%
\r
345 git clone https://github.com/LunarG/LunarGLASS.git .
\r
346 git checkout %LUNARGLASS_REVISION%
\r
349 echo Downloading LLVM archive...
\r
350 wget http://llvm.org/releases/3.4/llvm-3.4.src.tar.gz
\r
351 REM tar on windows can't filter through gzip, so the below line doesn't work
\r
352 REM tar --gzip -xf llvm-3.4.src.tar.gz
\r
354 echo Unzipping the archive...
\r
355 echo gzip --decompress --verbose --keep llvm-3.4.src.tar.gz
\r
356 gzip --decompress --verbose --keep llvm-3.4.src.tar.gz
\r
358 echo Extracting the archive... (this is slow)
\r
359 echo tar -xf llvm-3.4.src.tar
\r
360 tar -xf llvm-3.4.src.tar
\r
361 if not exist %LUNARGLASS_DIR%\Core\LLVM\llvm-3.4\lib (
\r
363 echo LLVM source download failed!
\r
364 echo Delete LunarGLASS directory and try again
\r
369 echo Syncing LunarGLASS source...
\r
370 cd %LUNARGLASS_DIR%
\r
371 REM put back the LunarGLASS github versions of some LLVM files
\r
373 REM overwrite with private gitlab versions of some files
\r
374 svn checkout -r %LUNARGLASS_REVISION_R32% --force https://cvs.khronos.org/svn/repos/SPIRV/trunk/LunarGLASS/ .
\r
376 if not exist %LUNARGLASS_DIR%\Frontends\SPIRV (
\r
378 echo LunarGLASS source download failed!
\r
385 echo Updating %LUNARGLASS_DIR%
\r
386 cd %LUNARGLASS_DIR%
\r
388 git checkout -f %LUNARGLASS_REVISION% .
\r
389 if not exist %LUNARGLASS_DIR%\.svn (
\r
390 svn checkout -r %LUNARGLASS_REVISION_R32% --force https://cvs.khronos.org/svn/repos/SPIRV/trunk/LunarGLASS/ .
\r
392 svn update -r %LUNARGLASS_REVISION_R325
\r
396 :create_spirv-tools
\r
398 echo Creating local spirv-tools repository %SPIRV_TOOLS_DIR%)
\r
399 mkdir %SPIRV_TOOLS_DIR%
\r
400 cd %SPIRV_TOOLS_DIR%
\r
401 git clone git@gitlab.khronos.org:spirv/spirv-tools.git .
402 git checkout %SPIRV_TOOLS_REVISION%
\r
403 if not exist %SPIRV_TOOLS_DIR%\source (
\r
404 echo spirv-tools source download failed!
\r
409 :update_spirv-tools
\r
411 echo Updating %SPIRV_TOOLS_DIR%
\r
412 cd %SPIRV_TOOLS_DIR%
\r
414 git checkout %SPIRV_TOOLS_REVISION%
\r
419 echo Building %GLSLANG_DIR%
\r
422 REM Cleanup any old directories lying around.
\r
423 rmdir /s /q build32
\r
426 echo Making 32-bit glslang
\r
427 echo *************************
\r
429 set GLSLANG_BUILD_DIR=%GLSLANG_DIR%\build32
\r
430 cd %GLSLANG_BUILD_DIR%
\r
432 echo Generating 32-bit Glslang CMake files for Visual Studio %VS_VERSION% -DCMAKE_INSTALL_PREFIX=install ..
\r
433 cmake -G "Visual Studio %VS_VERSION%" -DCMAKE_INSTALL_PREFIX=install ..
\r
435 echo Building 32-bit Glslang: MSBuild INSTALL.vcxproj /p:Platform=x86 /p:Configuration=Debug
\r
436 msbuild INSTALL.vcxproj /p:Platform=x86 /p:Configuration=Debug
\r
438 REM Check for existence of one lib, even though we should check for all results
\r
439 if not exist %GLSLANG_BUILD_DIR%\glslang\Debug\glslang.lib (
\r
441 echo glslang 32-bit Debug build failed!
\r
444 echo Building Glslang: MSBuild INSTALL.vcxproj /p:Platform=x86 /p:Configuration=Release
\r
445 msbuild INSTALL.vcxproj /p:Platform=x86 /p:Configuration=Release
\r
447 REM Check for existence of one lib, even though we should check for all results
\r
448 if not exist %GLSLANG_BUILD_DIR%\glslang\Release\glslang.lib (
\r
450 echo glslang 32-bit Release build failed!
\r
456 echo Making 64-bit glslang
\r
457 echo *************************
\r
459 set GLSLANG_BUILD_DIR=%GLSLANG_DIR%\build
\r
460 cd %GLSLANG_BUILD_DIR%
\r
462 echo Generating 64-bit Glslang CMake files for Visual Studio %VS_VERSION% -DCMAKE_INSTALL_PREFIX=install ..
\r
463 cmake -G "Visual Studio %VS_VERSION% Win64" -DCMAKE_INSTALL_PREFIX=install ..
\r
465 echo Building 64-bit Glslang: MSBuild INSTALL.vcxproj /p:Platform=x64 /p:Configuration=Debug
\r
466 msbuild INSTALL.vcxproj /p:Platform=x64 /p:Configuration=Debug
\r
468 REM Check for existence of one lib, even though we should check for all results
\r
469 if not exist %GLSLANG_BUILD_DIR%\glslang\Debug\glslang.lib (
\r
471 echo glslang 64-bit Debug build failed!
\r
474 echo Building Glslang: MSBuild INSTALL.vcxproj /p:Platform=x64 /p:Configuration=Release
\r
475 msbuild INSTALL.vcxproj /p:Platform=x64 /p:Configuration=Release
\r
477 REM Check for existence of one lib, even though we should check for all results
\r
478 if not exist %GLSLANG_BUILD_DIR%\glslang\Release\glslang.lib (
\r
480 echo glslang 64-bit Release build failed!
\r
487 echo Building %LUNARGLASS_DIR%
\r
488 set LLVM_DIR=%LUNARGLASS_DIR%\Core\LLVM\llvm-3.4
\r
491 REM Cleanup any old directories lying around.
\r
492 rmdir /s /q build32
\r
495 echo Making 32-bit LLVM
\r
496 echo *************************
\r
498 set LLVM_BUILD_DIR=%LLVM_DIR%\build32
\r
499 cd %LLVM_BUILD_DIR%
\r
501 echo Generating 32-bit LLVM CMake files for Visual Studio %VS_VERSION% -DCMAKE_INSTALL_PREFIX=install ..
\r
502 cmake -G "Visual Studio %VS_VERSION%" -DCMAKE_INSTALL_PREFIX=install ..
\r
504 echo Building 32-bit LLVM: MSBuild INSTALL.vcxproj /p:Platform=x86 /p:Configuration=Release
\r
505 msbuild INSTALL.vcxproj /p:Platform=x86 /p:Configuration=Release
\r
506 REM Check for existence of one lib, even though we should check for all results
\r
507 if not exist %LLVM_BUILD_DIR%\lib\Release\LLVMCore.lib (
\r
509 echo LLVM 32-bit Release build failed!
\r
513 REM disable Debug build of LLVM until LunarGLASS cmake files are updated to
\r
514 REM handle Debug and Release builds of glslang simultaneously, instead of
\r
515 REM whatever last lands in "./build32/install"
\r
516 REM echo Building 32-bit LLVM: MSBuild INSTALL.vcxproj /p:Platform=x86 /p:Configuration=Debug
\r
517 REM msbuild INSTALL.vcxproj /p:Platform=x86 /p:Configuration=Debug
\r
518 REM Check for existence of one lib, even though we should check for all results
\r
519 REM if not exist %LLVM_BUILD_DIR%\lib\Debug\LLVMCore.lib (
\r
521 REM echo LLVM 32-bit Debug build failed!
\r
522 REM set errorCode=1
\r
528 echo Making 64-bit LLVM
\r
529 echo *************************
\r
531 set LLVM_BUILD_DIR=%LLVM_DIR%\build
\r
532 cd %LLVM_BUILD_DIR%
\r
534 echo Generating 64-bit LLVM CMake files for Visual Studio %VS_VERSION% -DCMAKE_INSTALL_PREFIX=install ..
\r
535 cmake -G "Visual Studio %VS_VERSION% Win64" -DCMAKE_INSTALL_PREFIX=install ..
\r
537 echo Building 64-bit LLVM: MSBuild INSTALL.vcxproj /p:Platform=x64 /p:Configuration=Release
\r
538 msbuild INSTALL.vcxproj /p:Platform=x64 /p:Configuration=Release
\r
539 REM Check for existence of one lib, even though we should check for all results
\r
540 if not exist %LLVM_BUILD_DIR%\lib\Release\LLVMCore.lib (
\r
542 echo LLVM 64-bit Release build failed!
\r
546 REM disable Debug build of LLVM until LunarGLASS cmake files are updated to
\r
547 REM handle Debug and Release builds of glslang simultaneously, instead of
\r
548 REM whatever last lands in "./build/install"
\r
549 REM echo Building 64-bit LLVM: MSBuild INSTALL.vcxproj /p:Platform=x64 /p:Configuration=Debug
\r
550 REM msbuild INSTALL.vcxproj /p:Platform=x64 /p:Configuration=Debug
\r
551 REM Check for existence of one lib, even though we should check for all results
\r
552 REM if not exist %LLVM_BUILD_DIR%\lib\Debug\LLVMCore.lib (
\r
554 REM echo LLVM 64-bit Debug build failed!
\r
555 REM set errorCode=1
\r
559 cd %LUNARGLASS_DIR%
\r
561 REM Cleanup any old directories lying around.
\r
562 rmdir /s /q build32
\r
565 echo Making 32-bit LunarGLASS
\r
566 echo *************************
\r
568 set LUNARGLASS_BUILD_DIR=%LUNARGLASS_DIR%\build32
\r
569 cd %LUNARGLASS_BUILD_DIR%
\r
571 echo Generating 32-bit LunarGlass CMake files for Visual Studio %VS_VERSION% -DCMAKE_INSTALL_PREFIX=install ..
\r
572 cmake -G "Visual Studio %VS_VERSION%" -DCMAKE_INSTALL_PREFIX=install ..
\r
574 echo Building 32-bit LunarGlass: MSBuild INSTALL.vcxproj /p:Platform=x86 /p:Configuration=Release
\r
575 msbuild INSTALL.vcxproj /p:Platform=x86 /p:Configuration=Release
\r
577 REM Check for existence of one lib, even though we should check for all results
\r
578 if not exist %LUNARGLASS_BUILD_DIR%\Core\Release\core.lib (
\r
580 echo LunarGLASS 32-bit Release build failed!
\r
585 REM disable Debug build of LunarGLASS until its cmake file can be updated to
\r
586 REM handle Debug and Release builds of glslang simultaneously, instead of
\r
587 REM whatever last lands in "./build/install"
\r
588 REM echo Building 32-bit LunarGlass: MSBuild INSTALL.vcxproj /p:Platform=x86 /p:Configuration=Debug
\r
589 REM msbuild INSTALL.vcxproj /p:Platform=x86 /p:Configuration=Debug
\r
590 REM Check for existence of one lib, even though we should check for all results
\r
591 REM if not exist %LUNARGLASS_BUILD_DIR%\Core\Debug\core.lib (
\r
593 REM echo LunarGLASS 32-bit Debug build failed!
\r
594 REM set errorCode=1
\r
600 echo Making 64-bit LunarGLASS
\r
601 echo *************************
\r
603 set LUNARGLASS_BUILD_DIR=%LUNARGLASS_DIR%\build
\r
604 cd %LUNARGLASS_BUILD_DIR%
\r
606 echo Generating 64-bit LunarGlass CMake files for Visual Studio %VS_VERSION% -DCMAKE_INSTALL_PREFIX=install ..
\r
607 cmake -G "Visual Studio %VS_VERSION% Win64" -DCMAKE_INSTALL_PREFIX=install ..
\r
609 echo Building 64-bit LunarGlass: MSBuild INSTALL.vcxproj /p:Platform=x64 /p:Configuration=Release
\r
610 msbuild INSTALL.vcxproj /p:Platform=x64 /p:Configuration=Release
\r
612 REM Check for existence of one lib, even though we should check for all results
\r
613 if not exist %LUNARGLASS_BUILD_DIR%\Core\Release\core.lib (
\r
615 echo LunarGLASS 64-bit Release build failed!
\r
620 REM disable Debug build of LunarGLASS until its cmake file can be updated to
\r
621 REM handle Debug and Release builds of glslang simultaneously, instead of
\r
622 REM whatever last lands in "./build/install"
\r
623 REM echo Building 64-bit LunarGlass: MSBuild INSTALL.vcxproj /p:Platform=x64 /p:Configuration=Debug
\r
624 REM msbuild INSTALL.vcxproj /p:Platform=x64 /p:Configuration=Debug
\r
625 REM Check for existence of one lib, even though we should check for all results
\r
626 REM if not exist %LUNARGLASS_BUILD_DIR%\Core\Debug\core.lib (
\r
628 REM echo LunarGLASS 64-bit Debug build failed!
\r
629 REM set errorCode=1
\r
636 echo Building %SPIRV_TOOLS_DIR%
\r
637 cd %SPIRV_TOOLS_DIR%
\r
639 REM Cleanup any old directories lying around.
\r
640 rmdir /s /q build32
\r
643 echo Making 32-bit spirv-tools
\r
644 echo *************************
\r
646 set SPIRV_TOOLS_BUILD_DIR=%SPIRV_TOOLS_DIR%\build32
\r
648 cd %SPIRV_TOOLS_BUILD_DIR%
\r
650 echo Generating 32-bit spirv-tools CMake files for Visual Studio %VS_VERSION% ..
\r
651 cmake -G "Visual Studio %VS_VERSION%" ..
\r
653 echo Building 32-bit spirv-tools: MSBuild ALL_BUILD.vcxproj /p:Platform=x86 /p:Configuration=Debug
\r
654 msbuild ALL_BUILD.vcxproj /p:Platform=x86 /p:Configuration=Debug
\r
656 REM Check for existence of one lib, even though we should check for all results
\r
657 if not exist %SPIRV_TOOLS_BUILD_DIR%\Debug\SPIRV-Tools.lib (
\r
659 echo spirv-tools 32-bit Debug build failed!
\r
663 echo Building 32-bit spirv-tools: MSBuild ALL_BUILD.vcxproj /p:Platform=x86 /p:Configuration=Release
\r
664 msbuild ALL_BUILD.vcxproj /p:Platform=x86 /p:Configuration=Release
\r
666 REM Check for existence of one lib, even though we should check for all results
\r
667 if not exist %SPIRV_TOOLS_BUILD_DIR%\Release\SPIRV-Tools.lib (
\r
669 echo spirv-tools 32-bit Release build failed!
\r
675 echo Making 64-bit spirv-tools
\r
676 echo *************************
\r
678 set SPIRV_TOOLS_BUILD_DIR=%SPIRV_TOOLS_DIR%\build
\r
679 cd %SPIRV_TOOLS_BUILD_DIR%
\r
681 echo Generating 64-bit spirv-tools CMake files for Visual Studio %VS_VERSION% ..
\r
682 cmake -G "Visual Studio %VS_VERSION% Win64" ..
\r
684 echo Building 64-bit spirv-tools: MSBuild ALL_BUILD.vcxproj /p:Platform=x64 /p:Configuration=Debug
\r
685 msbuild ALL_BUILD.vcxproj /p:Platform=x64 /p:Configuration=Debug
\r
687 REM Check for existence of one lib, even though we should check for all results
\r
688 if not exist %SPIRV_TOOLS_BUILD_DIR%\Debug\SPIRV-Tools.lib (
\r
690 echo spirv-tools 64-bit Debug build failed!
\r
694 echo Building 64-bit spirv-tools: MSBuild ALL_BUILD.vcxproj /p:Platform=x64 /p:Configuration=Release
\r
695 msbuild ALL_BUILD.vcxproj /p:Platform=x64 /p:Configuration=Release
\r
697 REM Check for existence of one lib, even though we should check for all results
\r
698 if not exist %SPIRV_TOOLS_BUILD_DIR%\Release\SPIRV-Tools.lib (
\r
700 echo spirv-tools 64-bit Release build failed!
\r