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