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 16 matching lines...) Expand all Loading... |
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 --enable-werror Treat warnings as errors (/WX) | 31 --enable-werror Treat warnings as errors (/WX) |
32 --target=isa-os-cc Target specifier (required) | 32 --target=isa-os-cc Target specifier (required) |
33 --out=filename Write output to a file [stdout] | 33 --out=filename Write output to a file [stdout] |
34 --name=project_name Name of the project (required) | 34 --name=project_name Name of the project (required) |
35 --proj-guid=GUID GUID to use for the project | 35 --proj-guid=GUID GUID to use for the project |
36 --module-def=filename File containing export definitions (for DLLs) | 36 --module-def=filename File containing export definitions (for DLLs) |
37 --ver=version Version (10,11,12) of visual studio to generate
for | 37 --ver=version Version (10,11,12,14) of visual studio to genera
te for |
38 --src-path-bare=dir Path to root of source tree | 38 --src-path-bare=dir Path to root of source tree |
39 -Ipath/to/include Additional include directories | 39 -Ipath/to/include Additional include directories |
40 -DFLAG[=value] Preprocessor macros to define | 40 -DFLAG[=value] Preprocessor macros to define |
41 -Lpath/to/lib Additional library search paths | 41 -Lpath/to/lib Additional library search paths |
42 -llibname Library to link against | 42 -llibname Library to link against |
43 EOF | 43 EOF |
44 exit 1 | 44 exit 1 |
45 } | 45 } |
46 | 46 |
47 tag_content() { | 47 tag_content() { |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 src_path_bare=$(fix_path "$optval") | 161 src_path_bare=$(fix_path "$optval") |
162 src_path_bare=${src_path_bare%/} | 162 src_path_bare=${src_path_bare%/} |
163 ;; | 163 ;; |
164 --static-crt) use_static_runtime=true | 164 --static-crt) use_static_runtime=true |
165 ;; | 165 ;; |
166 --enable-werror) werror=true | 166 --enable-werror) werror=true |
167 ;; | 167 ;; |
168 --ver=*) | 168 --ver=*) |
169 vs_ver="$optval" | 169 vs_ver="$optval" |
170 case "$optval" in | 170 case "$optval" in |
171 10|11|12) | 171 10|11|12|14) |
172 ;; | 172 ;; |
173 *) die Unrecognized Visual Studio Version in $opt | 173 *) die Unrecognized Visual Studio Version in $opt |
174 ;; | 174 ;; |
175 esac | 175 esac |
176 ;; | 176 ;; |
177 -I*) | 177 -I*) |
178 opt=${opt##-I} | 178 opt=${opt##-I} |
179 opt=$(fix_path "$opt") | 179 opt=$(fix_path "$opt") |
180 opt="${opt%/}" | 180 opt="${opt%/}" |
181 incs="${incs}${incs:+;}"${opt}"" | 181 incs="${incs}${incs:+;}"${opt}"" |
(...skipping 29 matching lines...) Expand all Loading... |
211 done | 211 done |
212 | 212 |
213 # Make one call to fix_path for file_list to improve performance. | 213 # Make one call to fix_path for file_list to improve performance. |
214 fix_file_list | 214 fix_file_list |
215 | 215 |
216 outfile=${outfile:-/dev/stdout} | 216 outfile=${outfile:-/dev/stdout} |
217 guid=${guid:-`generate_uuid`} | 217 guid=${guid:-`generate_uuid`} |
218 asm_use_custom_step=false | 218 asm_use_custom_step=false |
219 uses_asm=${uses_asm:-false} | 219 uses_asm=${uses_asm:-false} |
220 case "${vs_ver:-11}" in | 220 case "${vs_ver:-11}" in |
221 10|11|12) | 221 10|11|12|14) |
222 asm_use_custom_step=$uses_asm | 222 asm_use_custom_step=$uses_asm |
223 ;; | 223 ;; |
224 esac | 224 esac |
225 | 225 |
226 [ -n "$name" ] || die "Project name (--name) must be specified!" | 226 [ -n "$name" ] || die "Project name (--name) must be specified!" |
227 [ -n "$target" ] || die "Target (--target) must be specified!" | 227 [ -n "$target" ] || die "Target (--target) must be specified!" |
228 | 228 |
229 if ${use_static_runtime:-false}; then | 229 if ${use_static_runtime:-false}; then |
230 release_runtime=MultiThreaded | 230 release_runtime=MultiThreaded |
231 debug_runtime=MultiThreadedDebug | 231 debug_runtime=MultiThreadedDebug |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
337 else | 337 else |
338 tag_content PlatformToolset v110 | 338 tag_content PlatformToolset v110 |
339 fi | 339 fi |
340 fi | 340 fi |
341 if [ "$vs_ver" = "12" ]; then | 341 if [ "$vs_ver" = "12" ]; then |
342 # Setting a PlatformToolset indicating windows phone isn't | 342 # Setting a PlatformToolset indicating windows phone isn't |
343 # enough to build code for arm with MSVC 2013, one strictly | 343 # enough to build code for arm with MSVC 2013, one strictly |
344 # has to enable AppContainerApplication as well. | 344 # has to enable AppContainerApplication as well. |
345 tag_content PlatformToolset v120 | 345 tag_content PlatformToolset v120 |
346 fi | 346 fi |
| 347 if [ "$vs_ver" = "14" ]; then |
| 348 tag_content PlatformToolset v140 |
| 349 fi |
347 tag_content CharacterSet Unicode | 350 tag_content CharacterSet Unicode |
348 if [ "$config" = "Release" ]; then | 351 if [ "$config" = "Release" ]; then |
349 tag_content WholeProgramOptimization true | 352 tag_content WholeProgramOptimization true |
350 fi | 353 fi |
351 close_tag PropertyGroup | 354 close_tag PropertyGroup |
352 done | 355 done |
353 done | 356 done |
354 | 357 |
355 tag Import \ | 358 tag Import \ |
356 Project="\$(VCTargetsPath)\\Microsoft.Cpp.props" | 359 Project="\$(VCTargetsPath)\\Microsoft.Cpp.props" |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
478 } | 481 } |
479 | 482 |
480 # This regexp doesn't catch most of the strings in the vcxproj format, | 483 # This regexp doesn't catch most of the strings in the vcxproj format, |
481 # since they're like <tag>path</tag> instead of <tag attr="path" /> | 484 # since they're like <tag>path</tag> instead of <tag attr="path" /> |
482 # as previously. It still seems to work ok despite this. | 485 # as previously. It still seems to work ok despite this. |
483 generate_vcxproj | | 486 generate_vcxproj | |
484 sed -e '/"/s;\([^ "]\)/;\1\\;g' | | 487 sed -e '/"/s;\([^ "]\)/;\1\\;g' | |
485 sed -e '/xmlns/s;\\;/;g' > ${outfile} | 488 sed -e '/xmlns/s;\\;/;g' > ${outfile} |
486 | 489 |
487 exit | 490 exit |
OLD | NEW |