OLD | NEW |
1 #!/bin/bash | 1 #!/bin/bash |
2 ## | 2 ## |
3 ## Copyright (c) 2013 The WebM project authors. All Rights Reserved. | 3 ## Copyright (c) 2013 The WebM project authors. All Rights Reserved. |
4 ## | 4 ## |
5 ## Use of this source code is governed by a BSD-style license | 5 ## Use of this source code is governed by a BSD-style license |
6 ## that can be found in the LICENSE file in the root of the source | 6 ## that can be found in the LICENSE file in the root of the source |
7 ## tree. An additional intellectual property rights grant can be found | 7 ## tree. An additional intellectual property rights grant can be found |
8 ## in the file PATENTS. All contributing project authors may | 8 ## in the file PATENTS. All contributing project authors may |
9 ## be found in the AUTHORS file in the root of the source tree. | 9 ## be found in the AUTHORS file in the root of the source tree. |
10 ## | 10 ## |
(...skipping 15 matching lines...) Expand all Loading... |
26 --help Print this message | 26 --help Print this message |
27 --exe Generate a project for building an Application | 27 --exe Generate a project for building an Application |
28 --lib Generate a project for creating a static library | 28 --lib Generate a project for creating a static library |
29 --dll Generate a project for creating a dll | 29 --dll Generate a project for creating a dll |
30 --static-crt Use the static C runtime (/MT) | 30 --static-crt Use the static C runtime (/MT) |
31 --target=isa-os-cc Target specifier (required) | 31 --target=isa-os-cc Target specifier (required) |
32 --out=filename Write output to a file [stdout] | 32 --out=filename Write output to a file [stdout] |
33 --name=project_name Name of the project (required) | 33 --name=project_name Name of the project (required) |
34 --proj-guid=GUID GUID to use for the project | 34 --proj-guid=GUID GUID to use for the project |
35 --module-def=filename File containing export definitions (for DLLs) | 35 --module-def=filename File containing export definitions (for DLLs) |
36 --ver=version Version (10,11) of visual studio to generate for | 36 --ver=version Version (10,11,12) of visual studio to generate
for |
37 --src-path-bare=dir Path to root of source tree | 37 --src-path-bare=dir Path to root of source tree |
38 -Ipath/to/include Additional include directories | 38 -Ipath/to/include Additional include directories |
39 -DFLAG[=value] Preprocessor macros to define | 39 -DFLAG[=value] Preprocessor macros to define |
40 -Lpath/to/lib Additional library search paths | 40 -Lpath/to/lib Additional library search paths |
41 -llibname Library to link against | 41 -llibname Library to link against |
42 EOF | 42 EOF |
43 exit 1 | 43 exit 1 |
44 } | 44 } |
45 | 45 |
46 die() { | 46 die() { |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 ;; | 221 ;; |
222 --lib) proj_kind="lib" | 222 --lib) proj_kind="lib" |
223 ;; | 223 ;; |
224 --src-path-bare=*) src_path_bare="$optval" | 224 --src-path-bare=*) src_path_bare="$optval" |
225 ;; | 225 ;; |
226 --static-crt) use_static_runtime=true | 226 --static-crt) use_static_runtime=true |
227 ;; | 227 ;; |
228 --ver=*) | 228 --ver=*) |
229 vs_ver="$optval" | 229 vs_ver="$optval" |
230 case "$optval" in | 230 case "$optval" in |
231 10|11) | 231 10|11|12) |
232 ;; | 232 ;; |
233 *) die Unrecognized Visual Studio Version in $opt | 233 *) die Unrecognized Visual Studio Version in $opt |
234 ;; | 234 ;; |
235 esac | 235 esac |
236 ;; | 236 ;; |
237 -I*) | 237 -I*) |
238 opt="${opt%/}" | 238 opt="${opt%/}" |
239 incs="${incs}${incs:+;}${opt##-I}" | 239 incs="${incs}${incs:+;}${opt##-I}" |
240 yasmincs="${yasmincs} ${opt}" | 240 yasmincs="${yasmincs} ${opt}" |
241 ;; | 241 ;; |
(...skipping 20 matching lines...) Expand all Loading... |
262 ;; | 262 ;; |
263 esac | 263 esac |
264 ;; | 264 ;; |
265 esac | 265 esac |
266 done | 266 done |
267 outfile=${outfile:-/dev/stdout} | 267 outfile=${outfile:-/dev/stdout} |
268 guid=${guid:-`generate_uuid`} | 268 guid=${guid:-`generate_uuid`} |
269 asm_use_custom_step=false | 269 asm_use_custom_step=false |
270 uses_asm=${uses_asm:-false} | 270 uses_asm=${uses_asm:-false} |
271 case "${vs_ver:-11}" in | 271 case "${vs_ver:-11}" in |
272 10|11) | 272 10|11|12) |
273 asm_use_custom_step=$uses_asm | 273 asm_use_custom_step=$uses_asm |
274 ;; | 274 ;; |
275 esac | 275 esac |
276 | 276 |
277 [ -n "$name" ] || die "Project name (--name) must be specified!" | 277 [ -n "$name" ] || die "Project name (--name) must be specified!" |
278 [ -n "$target" ] || die "Target (--target) must be specified!" | 278 [ -n "$target" ] || die "Target (--target) must be specified!" |
279 | 279 |
280 if ${use_static_runtime:-false}; then | 280 if ${use_static_runtime:-false}; then |
281 release_runtime=MultiThreaded | 281 release_runtime=MultiThreaded |
282 debug_runtime=MultiThreadedDebug | 282 debug_runtime=MultiThreadedDebug |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
376 # code for arm with the windows headers. Alternatively, | 376 # code for arm with the windows headers. Alternatively, |
377 # one could add AppContainerApplication=true in the Globals | 377 # one could add AppContainerApplication=true in the Globals |
378 # section and add PrecompiledHeader=NotUsing and | 378 # section and add PrecompiledHeader=NotUsing and |
379 # CompileAsWinRT=false in ClCompile and SubSystem=Console | 379 # CompileAsWinRT=false in ClCompile and SubSystem=Console |
380 # in Link. | 380 # in Link. |
381 tag_content PlatformToolset v110_wp80 | 381 tag_content PlatformToolset v110_wp80 |
382 else | 382 else |
383 tag_content PlatformToolset v110 | 383 tag_content PlatformToolset v110 |
384 fi | 384 fi |
385 fi | 385 fi |
| 386 if [ "$vs_ver" = "12" ]; then |
| 387 if [ "$plat" = "ARM" ]; then |
| 388 # Setting the wp80 toolchain automatically sets the |
| 389 # WINAPI_FAMILY define, which is required for building |
| 390 # code for arm with the windows headers. Alternatively, |
| 391 # one could add AppContainerApplication=true in the Globals |
| 392 # section and add PrecompiledHeader=NotUsing and |
| 393 # CompileAsWinRT=false in ClCompile and SubSystem=Console |
| 394 # in Link. |
| 395 tag_content PlatformToolset v120_wp80 |
| 396 else |
| 397 tag_content PlatformToolset v120 |
| 398 fi |
| 399 fi |
386 tag_content CharacterSet Unicode | 400 tag_content CharacterSet Unicode |
387 if [ "$config" = "Release" ]; then | 401 if [ "$config" = "Release" ]; then |
388 tag_content WholeProgramOptimization true | 402 tag_content WholeProgramOptimization true |
389 fi | 403 fi |
390 close_tag PropertyGroup | 404 close_tag PropertyGroup |
391 done | 405 done |
392 done | 406 done |
393 | 407 |
394 tag Import \ | 408 tag Import \ |
395 Project="\$(VCTargetsPath)\\Microsoft.Cpp.props" | 409 Project="\$(VCTargetsPath)\\Microsoft.Cpp.props" |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
521 } | 535 } |
522 | 536 |
523 # This regexp doesn't catch most of the strings in the vcxproj format, | 537 # This regexp doesn't catch most of the strings in the vcxproj format, |
524 # since they're like <tag>path</tag> instead of <tag attr="path" /> | 538 # since they're like <tag>path</tag> instead of <tag attr="path" /> |
525 # as previously. It still seems to work ok despite this. | 539 # as previously. It still seems to work ok despite this. |
526 generate_vcxproj | | 540 generate_vcxproj | |
527 sed -e '/"/s;\([^ "]\)/;\1\\;g' | | 541 sed -e '/"/s;\([^ "]\)/;\1\\;g' | |
528 sed -e '/xmlns/s;\\;/;g' > ${outfile} | 542 sed -e '/xmlns/s;\\;/;g' > ${outfile} |
529 | 543 |
530 exit | 544 exit |
OLD | NEW |