Mark Lobodzinski | 0e39375 | 2016-05-04 09:19:54 -0600 | [diff] [blame] | 1 | @echo off |
Mark Lobodzinski | 4f5ce47 | 2017-11-16 13:23:05 -0700 | [diff] [blame] | 2 | REM Update source for glslang |
Mark Lobodzinski | 0e39375 | 2016-05-04 09:19:54 -0600 | [diff] [blame] | 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 |
Karl Schultz | 0e41713 | 2018-01-03 12:50:46 -0700 | [diff] [blame] | 19 | set do_32=0 |
| 20 | set do_64=0 |
| 21 | set do_debug=0 |
| 22 | set do_release=0 |
Mark Lobodzinski | 0e39375 | 2016-05-04 09:19:54 -0600 | [diff] [blame] | 23 | |
| 24 | REM // ======== Parameter parsing ======== // |
| 25 | |
Jeff Juliano | 6c1422c | 2017-08-26 10:04:29 -0400 | [diff] [blame] | 26 | set arg-use-implicit-component-list=1 |
| 27 | set arg-do-glslang=0 |
Jeff Juliano | 6c1422c | 2017-08-26 10:04:29 -0400 | [diff] [blame] | 28 | set arg-no-sync=0 |
| 29 | set arg-no-build=0 |
Karl Schultz | 0e41713 | 2018-01-03 12:50:46 -0700 | [diff] [blame] | 30 | set arg-32=0 |
| 31 | set arg-64=0 |
| 32 | set arg-debug=0 |
| 33 | set arg-release=0 |
Jeff Juliano | 6c1422c | 2017-08-26 10:04:29 -0400 | [diff] [blame] | 34 | |
| 35 | :parameterLoop |
| 36 | |
| 37 | if "%1"=="" goto:parameterContinue |
| 38 | |
| 39 | if "%1" == "--glslang" ( |
| 40 | set arg-do-glslang=1 |
| 41 | set arg-use-implicit-component-list=0 |
| 42 | echo Building glslang ^(%1^) |
| 43 | shift |
| 44 | goto:parameterLoop |
| 45 | ) |
| 46 | |
| 47 | if "%1" == "-g" ( |
| 48 | set arg-do-glslang=1 |
| 49 | set arg-use-implicit-component-list=0 |
| 50 | echo Building glslang ^(%1^) |
| 51 | shift |
| 52 | goto:parameterLoop |
| 53 | ) |
| 54 | |
Jeff Juliano | 6c1422c | 2017-08-26 10:04:29 -0400 | [diff] [blame] | 55 | if "%1" == "--no-sync" ( |
| 56 | set arg-no-sync=1 |
| 57 | echo Skipping sync ^(%1^) |
| 58 | shift |
| 59 | goto:parameterLoop |
| 60 | ) |
| 61 | |
| 62 | if "%1" == "--no-build" ( |
| 63 | set arg-no-build=1 |
| 64 | echo Skipping build ^(%1^) |
| 65 | shift |
| 66 | goto:parameterLoop |
| 67 | ) |
| 68 | |
Karl Schultz | 0e41713 | 2018-01-03 12:50:46 -0700 | [diff] [blame] | 69 | if "%1" == "--32" ( |
| 70 | set arg-32=1 |
| 71 | echo 32-bit build requested |
| 72 | shift |
| 73 | goto:parameterLoop |
| 74 | ) |
| 75 | |
| 76 | if "%1" == "--64" ( |
| 77 | set arg-64=1 |
| 78 | echo 64-bit build requested |
| 79 | shift |
| 80 | goto:parameterLoop |
| 81 | ) |
| 82 | |
| 83 | if "%1" == "--debug" ( |
| 84 | set arg-debug=1 |
| 85 | echo debug build requested |
| 86 | shift |
| 87 | goto:parameterLoop |
| 88 | ) |
| 89 | |
| 90 | if "%1" == "--release" ( |
| 91 | set arg-release=1 |
| 92 | echo release build requested |
| 93 | shift |
| 94 | goto:parameterLoop |
| 95 | ) |
| 96 | |
Mark Lobodzinski | 4f5ce47 | 2017-11-16 13:23:05 -0700 | [diff] [blame] | 97 | if "%1" == "--spirv-tools" ( |
| 98 | echo --spirv-tools argument has been deprecated and is no longer necessary |
| 99 | shift |
| 100 | goto:parameterLoop |
| 101 | ) |
| 102 | |
| 103 | if "%1" == "-s" ( |
| 104 | echo --s argument has been deprecated and is no longer necessary |
| 105 | shift |
| 106 | goto:parameterLoop |
| 107 | ) |
| 108 | |
| 109 | if "%1" == "--all" ( |
| 110 | echo --all argument has been deprecated and is no longer necessary |
| 111 | set arg-do-glslang=1 |
| 112 | set arg-use-implicit-component-list=0 |
| 113 | echo Building glslang ^(%1^) |
| 114 | shift |
| 115 | goto:parameterLoop |
| 116 | ) |
| 117 | |
Jeff Juliano | 6c1422c | 2017-08-26 10:04:29 -0400 | [diff] [blame] | 118 | echo. |
| 119 | echo Unrecognized option "%1" |
| 120 | echo. |
Mark Lobodzinski | 0e39375 | 2016-05-04 09:19:54 -0600 | [diff] [blame] | 121 | echo usage: update_external_sources.bat [options] |
| 122 | echo. |
Jeff Juliano | 6c1422c | 2017-08-26 10:04:29 -0400 | [diff] [blame] | 123 | echo Available options: |
| 124 | echo -g ^| --glslang enable glslang component |
Jeff Juliano | 6c1422c | 2017-08-26 10:04:29 -0400 | [diff] [blame] | 125 | echo --all enable all components |
| 126 | echo --no-sync skip sync from git |
| 127 | echo --no-build skip build |
Karl Schultz | 0e41713 | 2018-01-03 12:50:46 -0700 | [diff] [blame] | 128 | echo --32 build for 32-bit |
| 129 | echo --64 build for 64-bit |
| 130 | echo --debug build for debug |
| 131 | echo --release build for release |
Jeff Juliano | 6c1422c | 2017-08-26 10:04:29 -0400 | [diff] [blame] | 132 | echo. |
Jeff Juliano | 3bedf34 | 2017-08-26 10:22:22 -0400 | [diff] [blame] | 133 | echo If any component enables are provided, only those components are enabled. |
| 134 | echo If no component enables are provided, all components are enabled. |
| 135 | echo. |
Jeff Juliano | 6c1422c | 2017-08-26 10:04:29 -0400 | [diff] [blame] | 136 | echo Sync uses git to pull a specific revision. |
| 137 | echo Build configures CMake, builds Release and Debug. |
Karl Schultz | 0e41713 | 2018-01-03 12:50:46 -0700 | [diff] [blame] | 138 | echo. |
| 139 | echo --32 without --64 builds only 32-bit, and vice-versa. |
| 140 | echo --debug without --release builds only debug, and vice-versa. |
| 141 | echo Specifying neither or both --32 and --64 builds both. |
| 142 | echo Specifying neither or both --debug and --release builds both. |
| 143 | echo So specifying none of these 4 options (default) builds all 4. |
Jeff Juliano | 6c1422c | 2017-08-26 10:04:29 -0400 | [diff] [blame] | 144 | |
Jeff Juliano | 3bedf34 | 2017-08-26 10:22:22 -0400 | [diff] [blame] | 145 | |
Jeff Juliano | 6c1422c | 2017-08-26 10:04:29 -0400 | [diff] [blame] | 146 | goto:error |
| 147 | |
| 148 | :parameterContinue |
| 149 | |
| 150 | if %arg-use-implicit-component-list% equ 1 ( |
Mark Lobodzinski | 4f5ce47 | 2017-11-16 13:23:05 -0700 | [diff] [blame] | 151 | echo Building glslang |
Jeff Juliano | 6c1422c | 2017-08-26 10:04:29 -0400 | [diff] [blame] | 152 | set arg-do-glslang=1 |
Mark Lobodzinski | 0e39375 | 2016-05-04 09:19:54 -0600 | [diff] [blame] | 153 | ) |
| 154 | |
| 155 | set sync-glslang=0 |
Mark Lobodzinski | 0e39375 | 2016-05-04 09:19:54 -0600 | [diff] [blame] | 156 | set build-glslang=0 |
Mark Lobodzinski | 0e39375 | 2016-05-04 09:19:54 -0600 | [diff] [blame] | 157 | set check-glslang-build-dependencies=0 |
| 158 | |
Jeff Juliano | 6c1422c | 2017-08-26 10:04:29 -0400 | [diff] [blame] | 159 | if %arg-do-glslang% equ 1 ( |
| 160 | if %arg-no-sync% equ 0 ( |
Mark Lobodzinski | 0e39375 | 2016-05-04 09:19:54 -0600 | [diff] [blame] | 161 | set sync-glslang=1 |
Mark Lobodzinski | 0e39375 | 2016-05-04 09:19:54 -0600 | [diff] [blame] | 162 | ) |
Jeff Juliano | 6c1422c | 2017-08-26 10:04:29 -0400 | [diff] [blame] | 163 | if %arg-no-build% equ 0 ( |
Mark Lobodzinski | 0e39375 | 2016-05-04 09:19:54 -0600 | [diff] [blame] | 164 | set check-glslang-build-dependencies=1 |
| 165 | set build-glslang=1 |
Mark Lobodzinski | 0e39375 | 2016-05-04 09:19:54 -0600 | [diff] [blame] | 166 | ) |
Jeff Juliano | 6c1422c | 2017-08-26 10:04:29 -0400 | [diff] [blame] | 167 | ) |
Mark Lobodzinski | 0e39375 | 2016-05-04 09:19:54 -0600 | [diff] [blame] | 168 | |
Karl Schultz | 0e41713 | 2018-01-03 12:50:46 -0700 | [diff] [blame] | 169 | if %arg-32% equ 1 ( |
| 170 | set do_32=1 |
| 171 | ) |
| 172 | if %arg-64% equ 1 ( |
| 173 | set do_64=1 |
| 174 | ) |
| 175 | if %arg-32% equ 0 ( |
| 176 | if %arg-64% equ 0 ( |
| 177 | set do_32=1 |
| 178 | set do_64=1 |
| 179 | ) |
| 180 | ) |
| 181 | |
| 182 | if %arg-debug% equ 1 ( |
| 183 | set do_debug=1 |
| 184 | ) |
| 185 | if %arg-release% equ 1 ( |
| 186 | set do_release=1 |
| 187 | ) |
| 188 | if %arg-debug% equ 0 ( |
| 189 | if %arg-release% equ 0 ( |
| 190 | set do_debug=1 |
| 191 | set do_release=1 |
| 192 | ) |
| 193 | ) |
| 194 | |
Jeff Juliano | 6c1422c | 2017-08-26 10:04:29 -0400 | [diff] [blame] | 195 | REM this is a debugging aid that can be enabled while debugging command-line parsing |
| 196 | if 0 equ 1 ( |
| 197 | set arg |
| 198 | set sync-glslang |
Jeff Juliano | 6c1422c | 2017-08-26 10:04:29 -0400 | [diff] [blame] | 199 | set build-glslang |
Jeff Juliano | 6c1422c | 2017-08-26 10:04:29 -0400 | [diff] [blame] | 200 | set check-glslang-build-dependencies |
Mark Lobodzinski | 0e39375 | 2016-05-04 09:19:54 -0600 | [diff] [blame] | 201 | goto:error |
Jeff Juliano | 6c1422c | 2017-08-26 10:04:29 -0400 | [diff] [blame] | 202 | ) |
Mark Lobodzinski | 0e39375 | 2016-05-04 09:19:54 -0600 | [diff] [blame] | 203 | |
| 204 | REM // ======== end Parameter parsing ======== // |
| 205 | |
| 206 | |
| 207 | REM // ======== Dependency checking ======== // |
| 208 | REM git is required for all paths |
| 209 | for %%X in (git.exe) do (set FOUND=%%~$PATH:X) |
| 210 | if not defined FOUND ( |
| 211 | echo Dependency check failed: |
| 212 | echo git.exe not found |
| 213 | echo Git for Windows can be downloaded here: https://git-scm.com/download/win |
| 214 | echo Install and ensure git.exe makes it into your PATH |
| 215 | set errorCode=1 |
| 216 | ) |
| 217 | |
| 218 | if %check-glslang-build-dependencies% equ 1 ( |
| 219 | for %%X in (cmake.exe) do (set FOUND=%%~$PATH:X) |
| 220 | if not defined FOUND ( |
| 221 | echo Dependency check failed: |
| 222 | echo cmake.exe not found |
Jeff Juliano | ede64a7 | 2017-08-26 08:20:51 -0400 | [diff] [blame] | 223 | echo Get CMake for Windows here: http://www.cmake.org/cmake/resources/software.html |
Mark Lobodzinski | 0e39375 | 2016-05-04 09:19:54 -0600 | [diff] [blame] | 224 | echo Install and ensure each makes it into your PATH, default is "C:\Program Files (x86)\CMake\bin" |
| 225 | set errorCode=1 |
| 226 | ) |
| 227 | ) |
| 228 | |
| 229 | |
| 230 | REM goto:main |
| 231 | |
| 232 | REM // ======== end Dependency checking ======== // |
| 233 | |
| 234 | :main |
| 235 | |
| 236 | if %errorCode% neq 0 (goto:error) |
| 237 | |
| 238 | REM Read the target versions from external file, which is shared with Linux script |
| 239 | |
Mike Weiblen | 2248925 | 2017-02-16 17:00:35 -0700 | [diff] [blame] | 240 | if not exist %REVISION_DIR%\glslang_giturl ( |
| 241 | echo. |
| 242 | echo Missing glslang_giturl file! Place it in %REVISION_DIR% with git repo URL in it. |
| 243 | set errorCode=1 |
| 244 | goto:error |
| 245 | ) |
| 246 | |
Mark Lobodzinski | 1e4da61 | 2016-11-18 13:20:36 -0700 | [diff] [blame] | 247 | if not exist %REVISION_DIR%\glslang_revision ( |
Mark Lobodzinski | 0e39375 | 2016-05-04 09:19:54 -0600 | [diff] [blame] | 248 | echo. |
Mike Weiblen | 2248925 | 2017-02-16 17:00:35 -0700 | [diff] [blame] | 249 | echo Missing glslang_revision file! Place it in %REVISION_DIR% with target version in it. |
| 250 | set errorCode=1 |
| 251 | goto:error |
| 252 | ) |
| 253 | |
Mike Weiblen | 2248925 | 2017-02-16 17:00:35 -0700 | [diff] [blame] | 254 | set /p GLSLANG_GITURL= < %REVISION_DIR%\glslang_giturl |
Mark Lobodzinski | 1e4da61 | 2016-11-18 13:20:36 -0700 | [diff] [blame] | 255 | set /p GLSLANG_REVISION= < %REVISION_DIR%\glslang_revision |
Mike Weiblen | 2248925 | 2017-02-16 17:00:35 -0700 | [diff] [blame] | 256 | |
| 257 | echo GLSLANG_GITURL=%GLSLANG_GITURL% |
Mark Lobodzinski | 0e39375 | 2016-05-04 09:19:54 -0600 | [diff] [blame] | 258 | echo GLSLANG_REVISION=%GLSLANG_REVISION% |
Mark Lobodzinski | 0e39375 | 2016-05-04 09:19:54 -0600 | [diff] [blame] | 259 | |
| 260 | |
Mark Lobodzinski | 4f5ce47 | 2017-11-16 13:23:05 -0700 | [diff] [blame] | 261 | echo Creating and/or updating glslang in %BASE_DIR% |
Mark Lobodzinski | 0e39375 | 2016-05-04 09:19:54 -0600 | [diff] [blame] | 262 | |
| 263 | if %sync-glslang% equ 1 ( |
Mark Lobodzinski | 0e39375 | 2016-05-04 09:19:54 -0600 | [diff] [blame] | 264 | if not exist %GLSLANG_DIR% ( |
| 265 | call:create_glslang |
| 266 | ) |
| 267 | if %errorCode% neq 0 (goto:error) |
| 268 | call:update_glslang |
| 269 | if %errorCode% neq 0 (goto:error) |
| 270 | ) |
| 271 | |
Mark Lobodzinski | 0e39375 | 2016-05-04 09:19:54 -0600 | [diff] [blame] | 272 | if %build-glslang% equ 1 ( |
| 273 | call:build_glslang |
| 274 | if %errorCode% neq 0 (goto:error) |
| 275 | ) |
| 276 | |
Mark Lobodzinski | 0e39375 | 2016-05-04 09:19:54 -0600 | [diff] [blame] | 277 | echo. |
| 278 | echo Exiting |
| 279 | goto:finish |
| 280 | |
| 281 | :error |
| 282 | echo. |
| 283 | echo Halting due to error |
Tony Barbour | 62f40db | 2017-06-21 10:22:05 -0600 | [diff] [blame] | 284 | set errorCode=1 |
Mark Lobodzinski | 0e39375 | 2016-05-04 09:19:54 -0600 | [diff] [blame] | 285 | goto:finish |
| 286 | |
| 287 | :finish |
| 288 | if not "%cd%\" == "%BUILD_DIR%" ( cd %BUILD_DIR% ) |
Tony Barbour | 62f40db | 2017-06-21 10:22:05 -0600 | [diff] [blame] | 289 | exit /b %errorCode% |
Mark Lobodzinski | 0e39375 | 2016-05-04 09:19:54 -0600 | [diff] [blame] | 290 | |
| 291 | |
| 292 | REM // ======== Functions ======== // |
| 293 | |
| 294 | :create_glslang |
| 295 | echo. |
| 296 | echo Creating local glslang repository %GLSLANG_DIR%) |
| 297 | mkdir %GLSLANG_DIR% |
| 298 | cd %GLSLANG_DIR% |
Mike Weiblen | 2248925 | 2017-02-16 17:00:35 -0700 | [diff] [blame] | 299 | git clone %GLSLANG_GITURL% . |
Mark Lobodzinski | 0e39375 | 2016-05-04 09:19:54 -0600 | [diff] [blame] | 300 | git checkout %GLSLANG_REVISION% |
saschawillems | 4eebd7f | 2017-11-03 15:27:27 +0100 | [diff] [blame] | 301 | python.exe .\update_glslang_sources.py |
Mark Lobodzinski | 0e39375 | 2016-05-04 09:19:54 -0600 | [diff] [blame] | 302 | if not exist %GLSLANG_DIR%\SPIRV ( |
Mark Lobodzinski | 4f5ce47 | 2017-11-16 13:23:05 -0700 | [diff] [blame] | 303 | echo glslang source download failed! |
| 304 | set errorCode=1 |
Mark Lobodzinski | 0e39375 | 2016-05-04 09:19:54 -0600 | [diff] [blame] | 305 | ) |
| 306 | goto:eof |
| 307 | |
| 308 | :update_glslang |
| 309 | echo. |
| 310 | echo Updating %GLSLANG_DIR% |
| 311 | cd %GLSLANG_DIR% |
| 312 | git fetch --all |
| 313 | git checkout %GLSLANG_REVISION% |
saschawillems | 4eebd7f | 2017-11-03 15:27:27 +0100 | [diff] [blame] | 314 | python.exe .\update_glslang_sources.py |
Mark Lobodzinski | 0e39375 | 2016-05-04 09:19:54 -0600 | [diff] [blame] | 315 | goto:eof |
| 316 | |
Mark Lobodzinski | 0e39375 | 2016-05-04 09:19:54 -0600 | [diff] [blame] | 317 | :build_glslang |
| 318 | echo. |
| 319 | echo Building %GLSLANG_DIR% |
| 320 | cd %GLSLANG_DIR% |
Mark Lobodzinski | 4f5ce47 | 2017-11-16 13:23:05 -0700 | [diff] [blame] | 321 | |
Lenny Komow | 3b62ce8 | 2016-11-29 14:24:39 -0700 | [diff] [blame] | 322 | if not exist build32 ( |
| 323 | mkdir build32 |
Mark Lobodzinski | 0e39375 | 2016-05-04 09:19:54 -0600 | [diff] [blame] | 324 | ) |
Lenny Komow | 3b62ce8 | 2016-11-29 14:24:39 -0700 | [diff] [blame] | 325 | if not exist build ( |
Mark Lobodzinski | 4f5ce47 | 2017-11-16 13:23:05 -0700 | [diff] [blame] | 326 | mkdir build |
Mark Lobodzinski | 0e39375 | 2016-05-04 09:19:54 -0600 | [diff] [blame] | 327 | ) |
Mark Lobodzinski | 4f5ce47 | 2017-11-16 13:23:05 -0700 | [diff] [blame] | 328 | |
Mark Lobodzinski | 0e39375 | 2016-05-04 09:19:54 -0600 | [diff] [blame] | 329 | set GLSLANG_BUILD_DIR=%GLSLANG_DIR%\build32 |
Karl Schultz | 0e41713 | 2018-01-03 12:50:46 -0700 | [diff] [blame] | 330 | if %do_32% equ 1 ( |
| 331 | echo Making 32-bit glslang |
| 332 | echo ************************* |
| 333 | cd %GLSLANG_BUILD_DIR% |
Mark Lobodzinski | 0e39375 | 2016-05-04 09:19:54 -0600 | [diff] [blame] | 334 | |
Karl Schultz | 0e41713 | 2018-01-03 12:50:46 -0700 | [diff] [blame] | 335 | echo Generating 32-bit Glslang CMake files for Visual Studio %VS_VERSION% -DCMAKE_INSTALL_PREFIX=install .. |
| 336 | cmake -G "Visual Studio %VS_VERSION%" -DCMAKE_INSTALL_PREFIX=install .. |
Mark Lobodzinski | 4f5ce47 | 2017-11-16 13:23:05 -0700 | [diff] [blame] | 337 | |
Karl Schultz | 0e41713 | 2018-01-03 12:50:46 -0700 | [diff] [blame] | 338 | if %do_debug% equ 1 ( |
| 339 | echo Building 32-bit Glslang: MSBuild INSTALL.vcxproj /p:Platform=x86 /p:Configuration=Debug |
| 340 | msbuild INSTALL.vcxproj /p:Platform=x86 /p:Configuration=Debug /verbosity:quiet |
Mark Lobodzinski | 4f5ce47 | 2017-11-16 13:23:05 -0700 | [diff] [blame] | 341 | |
Karl Schultz | 0e41713 | 2018-01-03 12:50:46 -0700 | [diff] [blame] | 342 | REM Check for existence of one lib, even though we should check for all results |
| 343 | if not exist %GLSLANG_BUILD_DIR%\glslang\Debug\glslangd.lib ( |
| 344 | echo. |
| 345 | echo glslang 32-bit Debug build failed! |
| 346 | set errorCode=1 |
| 347 | ) |
| 348 | ) |
| 349 | if %do_release% equ 1 ( |
| 350 | echo Building Glslang: MSBuild INSTALL.vcxproj /p:Platform=x86 /p:Configuration=Release |
| 351 | msbuild INSTALL.vcxproj /p:Platform=x86 /p:Configuration=Release /verbosity:quiet |
Mark Lobodzinski | 4f5ce47 | 2017-11-16 13:23:05 -0700 | [diff] [blame] | 352 | |
Karl Schultz | 0e41713 | 2018-01-03 12:50:46 -0700 | [diff] [blame] | 353 | REM Check for existence of one lib, even though we should check for all results |
| 354 | if not exist %GLSLANG_BUILD_DIR%\glslang\Release\glslang.lib ( |
| 355 | echo. |
| 356 | echo glslang 32-bit Release build failed! |
| 357 | set errorCode=1 |
| 358 | ) |
| 359 | ) |
| 360 | cd .. |
Mark Lobodzinski | 0e39375 | 2016-05-04 09:19:54 -0600 | [diff] [blame] | 361 | ) |
Mark Lobodzinski | 4f5ce47 | 2017-11-16 13:23:05 -0700 | [diff] [blame] | 362 | |
Mark Lobodzinski | 0e39375 | 2016-05-04 09:19:54 -0600 | [diff] [blame] | 363 | set GLSLANG_BUILD_DIR=%GLSLANG_DIR%\build |
Karl Schultz | 0e41713 | 2018-01-03 12:50:46 -0700 | [diff] [blame] | 364 | if %do_64% equ 1 ( |
| 365 | echo Making 64-bit glslang |
| 366 | echo ************************* |
| 367 | cd %GLSLANG_BUILD_DIR% |
Mark Lobodzinski | 0e39375 | 2016-05-04 09:19:54 -0600 | [diff] [blame] | 368 | |
Karl Schultz | 0e41713 | 2018-01-03 12:50:46 -0700 | [diff] [blame] | 369 | echo Generating 64-bit Glslang CMake files for Visual Studio %VS_VERSION% -DCMAKE_INSTALL_PREFIX=install .. |
| 370 | cmake -G "Visual Studio %VS_VERSION% Win64" -DCMAKE_INSTALL_PREFIX=install .. |
Mark Lobodzinski | 4f5ce47 | 2017-11-16 13:23:05 -0700 | [diff] [blame] | 371 | |
Karl Schultz | 0e41713 | 2018-01-03 12:50:46 -0700 | [diff] [blame] | 372 | if %do_debug% equ 1 ( |
| 373 | echo Building 64-bit Glslang: MSBuild INSTALL.vcxproj /p:Platform=x64 /p:Configuration=Debug |
| 374 | msbuild INSTALL.vcxproj /p:Platform=x64 /p:Configuration=Debug /verbosity:quiet |
Mark Lobodzinski | 4f5ce47 | 2017-11-16 13:23:05 -0700 | [diff] [blame] | 375 | |
Karl Schultz | 0e41713 | 2018-01-03 12:50:46 -0700 | [diff] [blame] | 376 | REM Check for existence of one lib, even though we should check for all results |
| 377 | if not exist %GLSLANG_BUILD_DIR%\glslang\Debug\glslangd.lib ( |
| 378 | echo. |
| 379 | echo glslang 64-bit Debug build failed! |
| 380 | set errorCode=1 |
| 381 | ) |
| 382 | ) |
| 383 | if %do_release% equ 1 ( |
| 384 | echo Building Glslang: MSBuild INSTALL.vcxproj /p:Platform=x64 /p:Configuration=Release |
| 385 | msbuild INSTALL.vcxproj /p:Platform=x64 /p:Configuration=Release /verbosity:quiet |
| 386 | |
| 387 | REM Check for existence of one lib, even though we should check for all results |
| 388 | if not exist %GLSLANG_BUILD_DIR%\glslang\Release\glslang.lib ( |
| 389 | echo. |
| 390 | echo glslang 64-bit Release build failed! |
| 391 | set errorCode=1 |
| 392 | ) |
| 393 | ) |
| 394 | cd .. |
Mark Lobodzinski | 0e39375 | 2016-05-04 09:19:54 -0600 | [diff] [blame] | 395 | ) |
Mark Lobodzinski | 4f5ce47 | 2017-11-16 13:23:05 -0700 | [diff] [blame] | 396 | |
Mark Lobodzinski | 0e39375 | 2016-05-04 09:19:54 -0600 | [diff] [blame] | 397 | goto:eof |