diff options
author | Martin Storsjo <martin@martin.st> | 2013-07-24 16:06:49 +0300 |
---|---|---|
committer | Martin Storsjo <martin@martin.st> | 2013-07-24 23:10:00 +0300 |
commit | feefd81bd7e28adc35acc61843223725898a9189 (patch) | |
tree | 93350279578e762566d40ac53727fd14471ad267 | |
parent | 47336afd8dd257cb7502db0664746f251be37e41 (diff) | |
download | libvpx-feefd81bd7e28adc35acc61843223725898a9189.tar libvpx-feefd81bd7e28adc35acc61843223725898a9189.tar.gz libvpx-feefd81bd7e28adc35acc61843223725898a9189.tar.bz2 libvpx-feefd81bd7e28adc35acc61843223725898a9189.zip |
msvs: Generate proper configurations for mixed platforms
Prior to 73c4e284, the generated .sln files didn't contain any
information about the different configurations when using .vcxproj
project files. The MSVS IDE was able to fill this in just fine when
loaded though.
When building for ARM, the obj_int_extract project still is built
for x86, in order for the build process to be able to use
obj_int_extract.exe.
Now that configuration info is generated, it breaks current ARM
setups, since the configurations generated by gen_msvs_sln.sh only
included configurations from the last parsed project file (as
mentioned in the comment).
In these setups, the MSVS IDE generated a third meta-platform, called
"Mixed Platforms". This meta-platform points to either ARM or
Win32 as platform in each of the individual projects.
When the MSVS IDE generated this automatically, it also included
the original ARM and Win32 platforms as separate choices, but these
can be omitted since they don't make sense.
Change-Id: Ie25226496f91af4bb1ad8eb9ae9ca5bfed0433d7
-rwxr-xr-x | build/make/gen_msvs_sln.sh | 32 |
1 files changed, 25 insertions, 7 deletions
diff --git a/build/make/gen_msvs_sln.sh b/build/make/gen_msvs_sln.sh index f9fc69428..0c269b16b 100755 --- a/build/make/gen_msvs_sln.sh +++ b/build/make/gen_msvs_sln.sh @@ -72,15 +72,21 @@ parse_project() { eval "${var}_name=$name" eval "${var}_guid=$guid" - # assume that all projects have the same list of possible configurations, - # so overwriting old config_lists is not a problem if [ "$sfx" = "vcproj" ]; then - config_list=`grep -A1 '<Configuration' $file | + cur_config_list=`grep -A1 '<Configuration' $file | grep Name | cut -d\" -f2` else - config_list=`grep -B1 'Label="Configuration"' $file | + cur_config_list=`grep -B1 'Label="Configuration"' $file | grep Condition | cut -d\' -f4` fi + new_config_list=$(for i in $config_list $cur_config_list; do + echo $i + done | sort | uniq) + if [ "$config_list" != "" ] && [ "$config_list" != "$new_config_list" ]; then + mixed_platforms=1 + fi + config_list="$new_config_list" + eval "${var}_config_list=\"$cur_config_list\"" proj_list="${proj_list} ${var}" } @@ -130,6 +136,11 @@ process_global() { indent_push IFS_bak=${IFS} IFS=$'\r'$'\n' + if [ "$mixed_platforms" != "" ]; then + config_list=" +Release|Mixed Platforms +Debug|Mixed Platforms" + fi for config in ${config_list}; do echo "${indent}$config = $config" done @@ -144,10 +155,17 @@ process_global() { indent_push for proj in ${proj_list}; do eval "local proj_guid=\${${proj}_guid}" + eval "local proj_config_list=\${${proj}_config_list}" IFS=$'\r'$'\n' - for config in ${config_list}; do - echo "${indent}${proj_guid}.${config}.ActiveCfg = ${config}" - echo "${indent}${proj_guid}.${config}.Build.0 = ${config}" + for config in ${proj_config_list}; do + if [ "$mixed_platforms" != "" ]; then + local c=${config%%|*} + echo "${indent}${proj_guid}.${c}|Mixed Platforms.ActiveCfg = ${config}" + echo "${indent}${proj_guid}.${c}|Mixed Platforms.Build.0 = ${config}" + else + echo "${indent}${proj_guid}.${config}.ActiveCfg = ${config}" + echo "${indent}${proj_guid}.${config}.Build.0 = ${config}" + fi done IFS=${IFS_bak} |