mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-03 17:37:18 +00:00
Support MSVC 2015
This commit is contained in:
parent
bd16ad62ae
commit
7d57e6e250
@ -441,13 +441,25 @@ if ! [ -z $ACTIVATE_MSVC ]; then
|
||||
originalCmdEnv["${separatedPair[0]}"]="${separatedPair[1]}"
|
||||
done
|
||||
|
||||
MSVC_INSTALLATION_PATH=$(vswhere -legacy -version $MSVC_VER -property installationPath)
|
||||
MSVC_INSTALLATION_PATH=$(vswhere -legacy -version [$MSVC_VER,$(awk "BEGIN { print $MSVC_VER + 1; exit }")\) -property installationPath)
|
||||
# capture CMD environment in a shell with MSVC activated
|
||||
if [ $MSVC_REAL_VER -ge 15 ]; then
|
||||
cmdEnv="$(cmd //c "${MSVC_INSTALLATION_PATH}\Common7\Tools\VsDevCmd.bat" -no_logo -arch=$([ $BITS -eq 64 ] && echo "amd64" || echo "x86") -host_arch=$([ $(uname -m) == 'x86_64' ] && echo "amd64" || echo "x86") "&&" set)"
|
||||
else
|
||||
echo "MSVC 2015 and older not yet supported"
|
||||
wrappedExit 1
|
||||
if [ $(uname -m) == 'x86_64' ]; then
|
||||
if [ $BITS -eq 64 ]; then
|
||||
compiler=amd64
|
||||
else
|
||||
compiler=amd64_x86
|
||||
fi
|
||||
else
|
||||
if [ $BITS -eq 64 ]; then
|
||||
compiler=x86_amd64
|
||||
else
|
||||
compiler=x86
|
||||
fi
|
||||
fi
|
||||
cmdEnv="$(cmd //c "${MSVC_INSTALLATION_PATH}\VC\vcvarsall.bat" $compiler "&&" set)"
|
||||
fi
|
||||
|
||||
declare -A cmdEnvChanges
|
||||
|
Loading…
Reference in New Issue
Block a user