Cody Northrop | 5934a88 | 2015-05-12 16:23:59 -0600 | [diff] [blame] | 1 | @echo off
|
Karl Schultz | 5d28859 | 2016-02-22 09:57:14 -0700 | [diff] [blame] | 2 | REM Update source for glslang, spirv-tools
|
Cody Northrop | 5934a88 | 2015-05-12 16:23:59 -0600 | [diff] [blame] | 3 |
|
Mark Young | d6f8faa | 2016-01-07 12:41:14 -0700 | [diff] [blame] | 4 | REM Determine the appropriate CMake strings for the current version of Visual Studio
|
| 5 | echo Determining VS version
|
| 6 | python .\determine_vs_version.py > vsversion.tmp
|
| 7 | set /p VS_VERSION=< vsversion.tmp
|
| 8 | echo Detected Visual Studio Version as %VS_VERSION%
|
| 9 |
|
Mark Young | d6f8faa | 2016-01-07 12:41:14 -0700 | [diff] [blame] | 10 | REM Cleanup the file we used to collect the VS version output since it's no longer needed.
|
| 11 | del /Q /F vsversion.tmp
|
| 12 |
|
Cody Northrop | 5934a88 | 2015-05-12 16:23:59 -0600 | [diff] [blame] | 13 | setlocal EnableDelayedExpansion
|
| 14 | set errorCode=0
|
| 15 | set BUILD_DIR=%~dp0
|
| 16 | set BASE_DIR=%BUILD_DIR%..
|
| 17 | set GLSLANG_DIR=%BASE_DIR%\glslang
|
Cody Northrop | e58683f | 2015-12-30 11:53:18 -0700 | [diff] [blame] | 18 | set SPIRV_TOOLS_DIR=%BASE_DIR%\spirv-tools
|
Cody Northrop | 5934a88 | 2015-05-12 16:23:59 -0600 | [diff] [blame] | 19 |
|
| 20 | REM // ======== Parameter parsing ======== //
|
| 21 |
|
| 22 | if "%1" == "" (
|
| 23 | echo usage: update_external_sources.bat [options]
|
| 24 | echo.
|
| 25 | echo Available options:
|
| 26 | echo --sync-glslang just pull glslang_revision
|
Mark Young | d6f8faa | 2016-01-07 12:41:14 -0700 | [diff] [blame] | 27 | echo --sync-spirv-tools just pull spirv-tools_revision
|
Cody Northrop | 5934a88 | 2015-05-12 16:23:59 -0600 | [diff] [blame] | 28 | echo --build-glslang pulls glslang_revision, configures CMake, builds Release and Debug
|
Cody Northrop | e58683f | 2015-12-30 11:53:18 -0700 | [diff] [blame] | 29 | echo --build-spirv-tools pulls spirv-tools_revision, configures CMake, builds Release and Debug
|
| 30 | echo --all sync and build glslang, LunarGLASS, spirv-tools
|
Cody Northrop | 5934a88 | 2015-05-12 16:23:59 -0600 | [diff] [blame] | 31 | goto:finish
|
| 32 | )
|
| 33 |
|
| 34 | set sync-glslang=0
|
Cody Northrop | e58683f | 2015-12-30 11:53:18 -0700 | [diff] [blame] | 35 | set sync-spirv-tools=0
|
Cody Northrop | 5934a88 | 2015-05-12 16:23:59 -0600 | [diff] [blame] | 36 | set build-glslang=0
|
Cody Northrop | e58683f | 2015-12-30 11:53:18 -0700 | [diff] [blame] | 37 | set build-spirv-tools=0
|
Cody Northrop | 5934a88 | 2015-05-12 16:23:59 -0600 | [diff] [blame] | 38 | set check-glslang-build-dependencies=0
|
Cody Northrop | 5934a88 | 2015-05-12 16:23:59 -0600 | [diff] [blame] | 39 |
|
| 40 | :parameterLoop
|
| 41 |
|
| 42 | if "%1"=="" goto:parameterContinue
|
| 43 |
|
| 44 | if "%1" == "--sync-glslang" (
|
| 45 | set sync-glslang=1
|
Cody Northrop | 4f30cdf | 2015-10-13 10:30:27 -0600 | [diff] [blame] | 46 | shift
|
| 47 | goto:parameterLoop
|
Cody Northrop | 5934a88 | 2015-05-12 16:23:59 -0600 | [diff] [blame] | 48 | )
|
| 49 |
|
Cody Northrop | e58683f | 2015-12-30 11:53:18 -0700 | [diff] [blame] | 50 | if "%1" == "--sync-spirv-tools" (
|
| 51 | set sync-spirv-tools=1
|
| 52 | shift
|
| 53 | goto:parameterLoop
|
| 54 | )
|
| 55 |
|
Cody Northrop | 5934a88 | 2015-05-12 16:23:59 -0600 | [diff] [blame] | 56 | if "%1" == "--build-glslang" (
|
| 57 | set sync-glslang=1
|
| 58 | set check-glslang-build-dependencies=1
|
| 59 | set build-glslang=1
|
| 60 | shift
|
| 61 | goto:parameterLoop
|
| 62 | )
|
| 63 |
|
Cody Northrop | e58683f | 2015-12-30 11:53:18 -0700 | [diff] [blame] | 64 | if "%1" == "--build-spirv-tools" (
|
| 65 | set sync-spirv-tools=1
|
| 66 | REM glslang has the same needs as spirv-tools
|
| 67 | set check-glslang-build-dependencies=1
|
| 68 | set build-spirv-tools=1
|
| 69 | shift
|
| 70 | goto:parameterLoop
|
| 71 | )
|
| 72 |
|
Cody Northrop | 5934a88 | 2015-05-12 16:23:59 -0600 | [diff] [blame] | 73 | if "%1" == "--all" (
|
| 74 | set sync-glslang=1
|
Cody Northrop | e58683f | 2015-12-30 11:53:18 -0700 | [diff] [blame] | 75 | set sync-spirv-tools=1
|
Cody Northrop | 5934a88 | 2015-05-12 16:23:59 -0600 | [diff] [blame] | 76 | set build-glslang=1
|
Cody Northrop | e58683f | 2015-12-30 11:53:18 -0700 | [diff] [blame] | 77 | set build-spirv-tools=1
|
Cody Northrop | 5934a88 | 2015-05-12 16:23:59 -0600 | [diff] [blame] | 78 | set check-glslang-build-dependencies=1
|
Cody Northrop | 5934a88 | 2015-05-12 16:23:59 -0600 | [diff] [blame] | 79 | shift
|
| 80 | goto:parameterLoop
|
| 81 | )
|
| 82 |
|
| 83 | echo Unrecognized options "%1"
|
| 84 | goto:error
|
| 85 |
|
| 86 | :parameterContinue
|
| 87 |
|
| 88 | REM // ======== end Parameter parsing ======== //
|
| 89 |
|
| 90 |
|
| 91 | REM // ======== Dependency checking ======== //
|
Cody Northrop | 4f30cdf | 2015-10-13 10:30:27 -0600 | [diff] [blame] | 92 | REM git is required for all paths
|
Cody Northrop | f91add8 | 2015-07-02 11:33:41 -0600 | [diff] [blame] | 93 | for %%X in (git.exe) do (set FOUND=%%~$PATH:X)
|
Cody Northrop | 5934a88 | 2015-05-12 16:23:59 -0600 | [diff] [blame] | 94 | if not defined FOUND (
|
| 95 | echo Dependency check failed:
|
Cody Northrop | f91add8 | 2015-07-02 11:33:41 -0600 | [diff] [blame] | 96 | echo git.exe not found
|
Cody Northrop | 4f30cdf | 2015-10-13 10:30:27 -0600 | [diff] [blame] | 97 | echo Git for Windows can be downloaded here: https://git-scm.com/download/win
|
Cody Northrop | f91add8 | 2015-07-02 11:33:41 -0600 | [diff] [blame] | 98 | echo Install and ensure git.exe makes it into your PATH
|
Cody Northrop | 5934a88 | 2015-05-12 16:23:59 -0600 | [diff] [blame] | 99 | set errorCode=1
|
| 100 | )
|
| 101 |
|
Cody Northrop | 5934a88 | 2015-05-12 16:23:59 -0600 | [diff] [blame] | 102 | if %check-glslang-build-dependencies% equ 1 (
|
| 103 | for %%X in (cmake.exe) do (set FOUND=%%~$PATH:X)
|
| 104 | if not defined FOUND (
|
| 105 | echo Dependency check failed:
|
| 106 | echo cmake.exe not found
|
| 107 | echo Get CNake 2.8 for Windows here: http://www.cmake.org/cmake/resources/software.html
|
| 108 | echo Install and ensure each makes it into your PATH, default is "C:\Program Files (x86)\CMake\bin"
|
| 109 | set errorCode=1
|
| 110 | )
|
| 111 | )
|
| 112 |
|
Cody Northrop | 5934a88 | 2015-05-12 16:23:59 -0600 | [diff] [blame] | 113 |
|
| 114 | REM goto:main
|
| 115 |
|
| 116 | REM // ======== end Dependency checking ======== //
|
| 117 |
|
| 118 | :main
|
| 119 |
|
| 120 | if %errorCode% neq 0 (goto:error)
|
| 121 |
|
| 122 | REM Read the target versions from external file, which is shared with Linux script
|
Cody Northrop | 5934a88 | 2015-05-12 16:23:59 -0600 | [diff] [blame] | 123 |
|
| 124 | if not exist glslang_revision (
|
| 125 | echo.
|
| 126 | echo Missing glslang_revision file! Place it next to this script with target version in it.
|
| 127 | set errorCode=1
|
| 128 | goto:error
|
| 129 | )
|
| 130 |
|
Cody Northrop | e58683f | 2015-12-30 11:53:18 -0700 | [diff] [blame] | 131 | if not exist spirv-tools_revision (
|
| 132 | echo.
|
| 133 | echo Missing spirv-tools_revision file! Place it next to this script with target version in it.
|
| 134 | set errorCode=1
|
| 135 | goto:error
|
| 136 | )
|
| 137 |
|
Cody Northrop | 5934a88 | 2015-05-12 16:23:59 -0600 | [diff] [blame] | 138 | set /p GLSLANG_REVISION= < glslang_revision
|
Cody Northrop | e58683f | 2015-12-30 11:53:18 -0700 | [diff] [blame] | 139 | set /p SPIRV_TOOLS_REVISION= < spirv-tools_revision
|
Cody Northrop | 5934a88 | 2015-05-12 16:23:59 -0600 | [diff] [blame] | 140 | echo GLSLANG_REVISION=%GLSLANG_REVISION%
|
Cody Northrop | e58683f | 2015-12-30 11:53:18 -0700 | [diff] [blame] | 141 | echo SPIRV_TOOLS_REVISION=%SPIRV_TOOLS_REVISION%
|
Cody Northrop | 5934a88 | 2015-05-12 16:23:59 -0600 | [diff] [blame] | 142 |
|
GregF | 2288088 | 2015-09-23 11:16:44 -0600 | [diff] [blame] | 143 |
|
Karl Schultz | 5d28859 | 2016-02-22 09:57:14 -0700 | [diff] [blame] | 144 | echo Creating and/or updating glslang, spirv-tools in %BASE_DIR%
|
Cody Northrop | 5934a88 | 2015-05-12 16:23:59 -0600 | [diff] [blame] | 145 |
|
| 146 | if %sync-glslang% equ 1 (
|
Peter Lohrmann | 18c06a2 | 2016-02-16 15:20:58 -0800 | [diff] [blame] | 147 | if exist %GLSLANG_DIR% (
|
| 148 | rd /S /Q %GLSLANG_DIR%
|
| 149 | )
|
Cody Northrop | 5934a88 | 2015-05-12 16:23:59 -0600 | [diff] [blame] | 150 | if not exist %GLSLANG_DIR% (
|
| 151 | call:create_glslang
|
| 152 | )
|
| 153 | if %errorCode% neq 0 (goto:error)
|
| 154 | call:update_glslang
|
| 155 | if %errorCode% neq 0 (goto:error)
|
| 156 | )
|
| 157 |
|
Cody Northrop | e58683f | 2015-12-30 11:53:18 -0700 | [diff] [blame] | 158 | if %sync-spirv-tools% equ 1 (
|
Peter Lohrmann | 18c06a2 | 2016-02-16 15:20:58 -0800 | [diff] [blame] | 159 | if exist %SPIRV_TOOLS_DIR% (
|
| 160 | rd /S /Q %SPIRV_TOOLS_DIR%
|
| 161 | )
|
Cody Northrop | e58683f | 2015-12-30 11:53:18 -0700 | [diff] [blame] | 162 | if %errorlevel% neq 0 (goto:error)
|
| 163 | if not exist %SPIRV_TOOLS_DIR% (
|
| 164 | call:create_spirv-tools
|
| 165 | )
|
| 166 | if %errorCode% neq 0 (goto:error)
|
| 167 | call:update_spirv-tools
|
| 168 | if %errorCode% neq 0 (goto:error)
|
| 169 | )
|
| 170 |
|
Cody Northrop | 5934a88 | 2015-05-12 16:23:59 -0600 | [diff] [blame] | 171 | if %build-glslang% equ 1 (
|
| 172 | call:build_glslang
|
| 173 | if %errorCode% neq 0 (goto:error)
|
| 174 | )
|
| 175 |
|
Cody Northrop | e58683f | 2015-12-30 11:53:18 -0700 | [diff] [blame] | 176 | if %build-spirv-tools% equ 1 (
|
| 177 | call:build_spirv-tools
|
| 178 | if %errorCode% neq 0 (goto:error)
|
| 179 | )
|
| 180 |
|
Cody Northrop | 5934a88 | 2015-05-12 16:23:59 -0600 | [diff] [blame] | 181 | echo.
|
Cody Northrop | e58683f | 2015-12-30 11:53:18 -0700 | [diff] [blame] | 182 | echo Exiting
|
Cody Northrop | 5934a88 | 2015-05-12 16:23:59 -0600 | [diff] [blame] | 183 | goto:finish
|
| 184 |
|
| 185 | :error
|
| 186 | echo.
|
| 187 | echo Halting due to error
|
| 188 | goto:finish
|
| 189 |
|
| 190 | :finish
|
| 191 | if not "%cd%\" == "%BUILD_DIR%" ( cd %BUILD_DIR% )
|
| 192 | endlocal
|
| 193 | goto:eof
|
| 194 |
|
| 195 |
|
| 196 |
|
| 197 | REM // ======== Functions ======== //
|
| 198 |
|
| 199 | :create_glslang
|
Cody Northrop | 5934a88 | 2015-05-12 16:23:59 -0600 | [diff] [blame] | 200 | echo.
|
| 201 | echo Creating local glslang repository %GLSLANG_DIR%)
|
| 202 | mkdir %GLSLANG_DIR%
|
| 203 | cd %GLSLANG_DIR%
|
Peter Lohrmann | 18c06a2 | 2016-02-16 15:20:58 -0800 | [diff] [blame] | 204 | git clone https://github.com/KhronosGroup/glslang.git .
|
Cody Northrop | f91add8 | 2015-07-02 11:33:41 -0600 | [diff] [blame] | 205 | git checkout %GLSLANG_REVISION%
|
Cody Northrop | 5934a88 | 2015-05-12 16:23:59 -0600 | [diff] [blame] | 206 | if not exist %GLSLANG_DIR%\SPIRV (
|
| 207 | echo glslang source download failed!
|
| 208 | set errorCode=1
|
| 209 | )
|
| 210 | goto:eof
|
| 211 |
|
| 212 | :update_glslang
|
| 213 | echo.
|
| 214 | echo Updating %GLSLANG_DIR%
|
| 215 | cd %GLSLANG_DIR%
|
Greg Fischer | 0979230 | 2015-10-08 17:53:48 -0600 | [diff] [blame] | 216 | git fetch --all
|
Greg Fischer | 5467e75 | 2015-10-02 13:05:27 -0600 | [diff] [blame] | 217 | git checkout %GLSLANG_REVISION%
|
Cody Northrop | 5934a88 | 2015-05-12 16:23:59 -0600 | [diff] [blame] | 218 | goto:eof
|
| 219 |
|
Cody Northrop | e58683f | 2015-12-30 11:53:18 -0700 | [diff] [blame] | 220 | :create_spirv-tools
|
| 221 | echo.
|
| 222 | echo Creating local spirv-tools repository %SPIRV_TOOLS_DIR%)
|
| 223 | mkdir %SPIRV_TOOLS_DIR%
|
| 224 | cd %SPIRV_TOOLS_DIR%
|
Peter Lohrmann | 18c06a2 | 2016-02-16 15:20:58 -0800 | [diff] [blame] | 225 | git clone https://github.com/KhronosGroup/SPIRV-Tools.git . |
Cody Northrop | e58683f | 2015-12-30 11:53:18 -0700 | [diff] [blame] | 226 | git checkout %SPIRV_TOOLS_REVISION%
|
| 227 | if not exist %SPIRV_TOOLS_DIR%\source (
|
| 228 | echo spirv-tools source download failed!
|
| 229 | set errorCode=1
|
| 230 | )
|
| 231 | goto:eof
|
| 232 |
|
| 233 | :update_spirv-tools
|
| 234 | echo.
|
| 235 | echo Updating %SPIRV_TOOLS_DIR%
|
| 236 | cd %SPIRV_TOOLS_DIR%
|
| 237 | git fetch --all
|
| 238 | git checkout %SPIRV_TOOLS_REVISION%
|
| 239 | goto:eof
|
| 240 |
|
Cody Northrop | 5934a88 | 2015-05-12 16:23:59 -0600 | [diff] [blame] | 241 | :build_glslang
|
| 242 | echo.
|
| 243 | echo Building %GLSLANG_DIR%
|
| 244 | cd %GLSLANG_DIR%
|
Mark Young | 93ecb1d | 2016-01-13 13:47:16 -0700 | [diff] [blame] | 245 |
|
| 246 | REM Cleanup any old directories lying around.
|
Peter Lohrmann | 18c06a2 | 2016-02-16 15:20:58 -0800 | [diff] [blame] | 247 | if exist build32 (
|
| 248 | rmdir /s /q build32
|
| 249 | )
|
| 250 | if exist build (
|
| 251 | rmdir /s /q build
|
| 252 | )
|
Mark Young | 93ecb1d | 2016-01-13 13:47:16 -0700 | [diff] [blame] | 253 |
|
| 254 | echo Making 32-bit glslang
|
| 255 | echo *************************
|
| 256 | mkdir build32
|
| 257 | set GLSLANG_BUILD_DIR=%GLSLANG_DIR%\build32
|
Cody Northrop | 5934a88 | 2015-05-12 16:23:59 -0600 | [diff] [blame] | 258 | cd %GLSLANG_BUILD_DIR%
|
Mark Young | 93ecb1d | 2016-01-13 13:47:16 -0700 | [diff] [blame] | 259 |
|
| 260 | echo Generating 32-bit Glslang CMake files for Visual Studio %VS_VERSION% -DCMAKE_INSTALL_PREFIX=install ..
|
| 261 | cmake -G "Visual Studio %VS_VERSION%" -DCMAKE_INSTALL_PREFIX=install ..
|
| 262 |
|
| 263 | echo Building 32-bit Glslang: MSBuild INSTALL.vcxproj /p:Platform=x86 /p:Configuration=Debug
|
Mark Young | 4ae88c5 | 2016-02-01 11:43:39 -0700 | [diff] [blame] | 264 | msbuild INSTALL.vcxproj /p:Platform=x86 /p:Configuration=Debug /verbosity:quiet
|
Mark Young | 93ecb1d | 2016-01-13 13:47:16 -0700 | [diff] [blame] | 265 |
|
Cody Northrop | 5934a88 | 2015-05-12 16:23:59 -0600 | [diff] [blame] | 266 | REM Check for existence of one lib, even though we should check for all results
|
| 267 | if not exist %GLSLANG_BUILD_DIR%\glslang\Debug\glslang.lib (
|
| 268 | echo.
|
Mark Young | 93ecb1d | 2016-01-13 13:47:16 -0700 | [diff] [blame] | 269 | echo glslang 32-bit Debug build failed!
|
Cody Northrop | 5934a88 | 2015-05-12 16:23:59 -0600 | [diff] [blame] | 270 | set errorCode=1
|
| 271 | )
|
Mark Young | 93ecb1d | 2016-01-13 13:47:16 -0700 | [diff] [blame] | 272 | echo Building Glslang: MSBuild INSTALL.vcxproj /p:Platform=x86 /p:Configuration=Release
|
Mark Young | 4ae88c5 | 2016-02-01 11:43:39 -0700 | [diff] [blame] | 273 | msbuild INSTALL.vcxproj /p:Platform=x86 /p:Configuration=Release /verbosity:quiet
|
Mark Young | 93ecb1d | 2016-01-13 13:47:16 -0700 | [diff] [blame] | 274 |
|
Cody Northrop | 4f30cdf | 2015-10-13 10:30:27 -0600 | [diff] [blame] | 275 | REM Check for existence of one lib, even though we should check for all results
|
| 276 | if not exist %GLSLANG_BUILD_DIR%\glslang\Release\glslang.lib (
|
| 277 | echo.
|
Mark Young | 93ecb1d | 2016-01-13 13:47:16 -0700 | [diff] [blame] | 278 | echo glslang 32-bit Release build failed!
|
| 279 | set errorCode=1
|
| 280 | )
|
| 281 |
|
| 282 | cd ..
|
| 283 |
|
| 284 | echo Making 64-bit glslang
|
| 285 | echo *************************
|
Mark Young | ecf4582 | 2016-01-18 15:48:20 -0700 | [diff] [blame] | 286 | mkdir build
|
| 287 | set GLSLANG_BUILD_DIR=%GLSLANG_DIR%\build
|
Mark Young | 93ecb1d | 2016-01-13 13:47:16 -0700 | [diff] [blame] | 288 | cd %GLSLANG_BUILD_DIR%
|
| 289 |
|
| 290 | echo Generating 64-bit Glslang CMake files for Visual Studio %VS_VERSION% -DCMAKE_INSTALL_PREFIX=install ..
|
| 291 | cmake -G "Visual Studio %VS_VERSION% Win64" -DCMAKE_INSTALL_PREFIX=install ..
|
| 292 |
|
| 293 | echo Building 64-bit Glslang: MSBuild INSTALL.vcxproj /p:Platform=x64 /p:Configuration=Debug
|
Mark Young | 4ae88c5 | 2016-02-01 11:43:39 -0700 | [diff] [blame] | 294 | msbuild INSTALL.vcxproj /p:Platform=x64 /p:Configuration=Debug /verbosity:quiet
|
Mark Young | 93ecb1d | 2016-01-13 13:47:16 -0700 | [diff] [blame] | 295 |
|
| 296 | REM Check for existence of one lib, even though we should check for all results
|
| 297 | if not exist %GLSLANG_BUILD_DIR%\glslang\Debug\glslang.lib (
|
| 298 | echo.
|
| 299 | echo glslang 64-bit Debug build failed!
|
| 300 | set errorCode=1
|
| 301 | )
|
| 302 | echo Building Glslang: MSBuild INSTALL.vcxproj /p:Platform=x64 /p:Configuration=Release
|
Mark Young | 4ae88c5 | 2016-02-01 11:43:39 -0700 | [diff] [blame] | 303 | msbuild INSTALL.vcxproj /p:Platform=x64 /p:Configuration=Release /verbosity:quiet
|
Mark Young | 93ecb1d | 2016-01-13 13:47:16 -0700 | [diff] [blame] | 304 |
|
| 305 | REM Check for existence of one lib, even though we should check for all results
|
| 306 | if not exist %GLSLANG_BUILD_DIR%\glslang\Release\glslang.lib (
|
| 307 | echo.
|
| 308 | echo glslang 64-bit Release build failed!
|
Cody Northrop | 4f30cdf | 2015-10-13 10:30:27 -0600 | [diff] [blame] | 309 | set errorCode=1
|
| 310 | )
|
Cody Northrop | 5934a88 | 2015-05-12 16:23:59 -0600 | [diff] [blame] | 311 | goto:eof
|
| 312 |
|
Cody Northrop | e58683f | 2015-12-30 11:53:18 -0700 | [diff] [blame] | 313 | :build_spirv-tools
|
| 314 | echo.
|
| 315 | echo Building %SPIRV_TOOLS_DIR%
|
| 316 | cd %SPIRV_TOOLS_DIR%
|
Mark Young | 93ecb1d | 2016-01-13 13:47:16 -0700 | [diff] [blame] | 317 |
|
| 318 | REM Cleanup any old directories lying around.
|
Peter Lohrmann | 18c06a2 | 2016-02-16 15:20:58 -0800 | [diff] [blame] | 319 | if exist build32 (
|
| 320 | rmdir /s /q build32
|
| 321 | )
|
| 322 | if exist build (
|
| 323 | rmdir /s /q build
|
| 324 | )
|
Mark Young | a81e608 | 2016-01-15 12:35:39 -0700 | [diff] [blame] | 325 |
|
Mark Young | 93ecb1d | 2016-01-13 13:47:16 -0700 | [diff] [blame] | 326 | echo Making 32-bit spirv-tools
|
| 327 | echo *************************
|
| 328 | mkdir build32
|
| 329 | set SPIRV_TOOLS_BUILD_DIR=%SPIRV_TOOLS_DIR%\build32
|
Mark Young | 1ef2330 | 2016-01-13 13:47:16 -0700 | [diff] [blame] | 330 | |
Cody Northrop | e58683f | 2015-12-30 11:53:18 -0700 | [diff] [blame] | 331 | cd %SPIRV_TOOLS_BUILD_DIR%
|
Mark Young | 93ecb1d | 2016-01-13 13:47:16 -0700 | [diff] [blame] | 332 |
|
| 333 | echo Generating 32-bit spirv-tools CMake files for Visual Studio %VS_VERSION% ..
|
Mark Young | d6f8faa | 2016-01-07 12:41:14 -0700 | [diff] [blame] | 334 | cmake -G "Visual Studio %VS_VERSION%" ..
|
Mark Young | 93ecb1d | 2016-01-13 13:47:16 -0700 | [diff] [blame] | 335 |
|
| 336 | echo Building 32-bit spirv-tools: MSBuild ALL_BUILD.vcxproj /p:Platform=x86 /p:Configuration=Debug
|
Mark Young | 4ae88c5 | 2016-02-01 11:43:39 -0700 | [diff] [blame] | 337 | msbuild ALL_BUILD.vcxproj /p:Platform=x86 /p:Configuration=Debug /verbosity:quiet
|
Mark Young | 93ecb1d | 2016-01-13 13:47:16 -0700 | [diff] [blame] | 338 |
|
Cody Northrop | e58683f | 2015-12-30 11:53:18 -0700 | [diff] [blame] | 339 | REM Check for existence of one lib, even though we should check for all results
|
GregF | c283d0e | 2016-04-01 14:20:14 -0600 | [diff] [blame] | 340 | if not exist %SPIRV_TOOLS_BUILD_DIR%\source\Debug\SPIRV-Tools.lib (
|
Cody Northrop | e58683f | 2015-12-30 11:53:18 -0700 | [diff] [blame] | 341 | echo.
|
Mark Young | 93ecb1d | 2016-01-13 13:47:16 -0700 | [diff] [blame] | 342 | echo spirv-tools 32-bit Debug build failed!
|
Cody Northrop | e58683f | 2015-12-30 11:53:18 -0700 | [diff] [blame] | 343 | set errorCode=1
|
| 344 | )
|
Mark Young | 93ecb1d | 2016-01-13 13:47:16 -0700 | [diff] [blame] | 345 |
|
| 346 | echo Building 32-bit spirv-tools: MSBuild ALL_BUILD.vcxproj /p:Platform=x86 /p:Configuration=Release
|
Mark Young | 4ae88c5 | 2016-02-01 11:43:39 -0700 | [diff] [blame] | 347 | msbuild ALL_BUILD.vcxproj /p:Platform=x86 /p:Configuration=Release /verbosity:quiet
|
Mark Young | 93ecb1d | 2016-01-13 13:47:16 -0700 | [diff] [blame] | 348 |
|
Cody Northrop | e58683f | 2015-12-30 11:53:18 -0700 | [diff] [blame] | 349 | REM Check for existence of one lib, even though we should check for all results
|
GregF | c283d0e | 2016-04-01 14:20:14 -0600 | [diff] [blame] | 350 | if not exist %SPIRV_TOOLS_BUILD_DIR%\source\Release\SPIRV-Tools.lib (
|
Cody Northrop | e58683f | 2015-12-30 11:53:18 -0700 | [diff] [blame] | 351 | echo.
|
Mark Young | 93ecb1d | 2016-01-13 13:47:16 -0700 | [diff] [blame] | 352 | echo spirv-tools 32-bit Release build failed!
|
| 353 | set errorCode=1
|
| 354 | )
|
| 355 |
|
| 356 | cd ..
|
| 357 |
|
| 358 | echo Making 64-bit spirv-tools
|
| 359 | echo *************************
|
Mark Young | ecf4582 | 2016-01-18 15:48:20 -0700 | [diff] [blame] | 360 | mkdir build
|
| 361 | set SPIRV_TOOLS_BUILD_DIR=%SPIRV_TOOLS_DIR%\build
|
Mark Young | 93ecb1d | 2016-01-13 13:47:16 -0700 | [diff] [blame] | 362 | cd %SPIRV_TOOLS_BUILD_DIR%
|
Mark Young | c2f1021 | 2016-01-13 13:47:16 -0700 | [diff] [blame] | 363 | |
Mark Young | 93ecb1d | 2016-01-13 13:47:16 -0700 | [diff] [blame] | 364 | echo Generating 64-bit spirv-tools CMake files for Visual Studio %VS_VERSION% ..
|
| 365 | cmake -G "Visual Studio %VS_VERSION% Win64" ..
|
| 366 |
|
| 367 | echo Building 64-bit spirv-tools: MSBuild ALL_BUILD.vcxproj /p:Platform=x64 /p:Configuration=Debug
|
Mark Young | 4ae88c5 | 2016-02-01 11:43:39 -0700 | [diff] [blame] | 368 | msbuild ALL_BUILD.vcxproj /p:Platform=x64 /p:Configuration=Debug /verbosity:quiet
|
Mark Young | 93ecb1d | 2016-01-13 13:47:16 -0700 | [diff] [blame] | 369 |
|
| 370 | REM Check for existence of one lib, even though we should check for all results
|
GregF | c283d0e | 2016-04-01 14:20:14 -0600 | [diff] [blame] | 371 | if not exist %SPIRV_TOOLS_BUILD_DIR%\source\Debug\SPIRV-Tools.lib (
|
Mark Young | 93ecb1d | 2016-01-13 13:47:16 -0700 | [diff] [blame] | 372 | echo.
|
| 373 | echo spirv-tools 64-bit Debug build failed!
|
| 374 | set errorCode=1
|
| 375 | )
|
| 376 |
|
| 377 | echo Building 64-bit spirv-tools: MSBuild ALL_BUILD.vcxproj /p:Platform=x64 /p:Configuration=Release
|
Mark Young | 4ae88c5 | 2016-02-01 11:43:39 -0700 | [diff] [blame] | 378 | msbuild ALL_BUILD.vcxproj /p:Platform=x64 /p:Configuration=Release /verbosity:quiet
|
Mark Young | 93ecb1d | 2016-01-13 13:47:16 -0700 | [diff] [blame] | 379 |
|
| 380 | REM Check for existence of one lib, even though we should check for all results
|
GregF | c283d0e | 2016-04-01 14:20:14 -0600 | [diff] [blame] | 381 | if not exist %SPIRV_TOOLS_BUILD_DIR%\source\Release\SPIRV-Tools.lib (
|
Mark Young | 93ecb1d | 2016-01-13 13:47:16 -0700 | [diff] [blame] | 382 | echo.
|
| 383 | echo spirv-tools 64-bit Release build failed!
|
Cody Northrop | e58683f | 2015-12-30 11:53:18 -0700 | [diff] [blame] | 384 | set errorCode=1
|
| 385 | )
|
| 386 | goto:eof
|