mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-21 06:53:53 +00:00
Add Visual Studio 2019 support
This commit is contained in:
parent
1a610d3f72
commit
0220bcdef3
1 changed files with 41 additions and 19 deletions
|
@ -103,7 +103,7 @@ Options:
|
||||||
Build unit tests / Google test
|
Build unit tests / Google test
|
||||||
-u
|
-u
|
||||||
Configure for unity builds.
|
Configure for unity builds.
|
||||||
-v <2013/2015/2017>
|
-v <2013/2015/2017/2019>
|
||||||
Choose the Visual Studio version to use.
|
Choose the Visual Studio version to use.
|
||||||
-n
|
-n
|
||||||
Produce NMake makefiles instead of a Visual Studio solution.
|
Produce NMake makefiles instead of a Visual Studio solution.
|
||||||
|
@ -251,6 +251,18 @@ if [ -z $VS_VERSION ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
case $VS_VERSION in
|
case $VS_VERSION in
|
||||||
|
16|16.0|2019 )
|
||||||
|
GENERATOR="Visual Studio 16 2019"
|
||||||
|
TOOLSET="vc142"
|
||||||
|
MSVC_REAL_VER="16"
|
||||||
|
MSVC_VER="14.2"
|
||||||
|
MSVC_YEAR="2015"
|
||||||
|
MSVC_DISPLAY_YEAR="2019"
|
||||||
|
BOOST_VER="1.71.0"
|
||||||
|
BOOST_VER_URL="1_71_0"
|
||||||
|
BOOST_VER_SDK="107100"
|
||||||
|
;;
|
||||||
|
|
||||||
15|15.0|2017 )
|
15|15.0|2017 )
|
||||||
GENERATOR="Visual Studio 15 2017"
|
GENERATOR="Visual Studio 15 2017"
|
||||||
TOOLSET="vc141"
|
TOOLSET="vc141"
|
||||||
|
@ -258,6 +270,9 @@ case $VS_VERSION in
|
||||||
MSVC_VER="14.1"
|
MSVC_VER="14.1"
|
||||||
MSVC_YEAR="2015"
|
MSVC_YEAR="2015"
|
||||||
MSVC_DISPLAY_YEAR="2017"
|
MSVC_DISPLAY_YEAR="2017"
|
||||||
|
BOOST_VER="1.67.0"
|
||||||
|
BOOST_VER_URL="1_67_0"
|
||||||
|
BOOST_VER_SDK="106700"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
14|14.0|2015 )
|
14|14.0|2015 )
|
||||||
|
@ -267,6 +282,9 @@ case $VS_VERSION in
|
||||||
MSVC_VER="14.0"
|
MSVC_VER="14.0"
|
||||||
MSVC_YEAR="2015"
|
MSVC_YEAR="2015"
|
||||||
MSVC_DISPLAY_YEAR="2015"
|
MSVC_DISPLAY_YEAR="2015"
|
||||||
|
BOOST_VER="1.67.0"
|
||||||
|
BOOST_VER_URL="1_67_0"
|
||||||
|
BOOST_VER_SDK="106700"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
12|12.0|2013 )
|
12|12.0|2013 )
|
||||||
|
@ -276,6 +294,9 @@ case $VS_VERSION in
|
||||||
MSVC_VER="12.0"
|
MSVC_VER="12.0"
|
||||||
MSVC_YEAR="2013"
|
MSVC_YEAR="2013"
|
||||||
MSVC_DISPLAY_YEAR="2013"
|
MSVC_DISPLAY_YEAR="2013"
|
||||||
|
BOOST_VER="1.58.0"
|
||||||
|
BOOST_VER_URL="1_58_0"
|
||||||
|
BOOST_VER_SDK="105800"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
@ -315,7 +336,7 @@ case $CONFIGURATION in
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
if [ ${BITS} -eq 64 ]; then
|
if [ $BITS -eq 64 ] && [ $MSVC_REAL_VER -lt 16 ]; then
|
||||||
GENERATOR="${GENERATOR} Win64"
|
GENERATOR="${GENERATOR} Win64"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -323,7 +344,15 @@ if [ -n "$NMAKE" ]; then
|
||||||
GENERATOR="NMake Makefiles"
|
GENERATOR="NMake Makefiles"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ $MSVC_REAL_VER -ge 16 ]; then
|
||||||
|
if [ $BITS -eq 64 ]; then
|
||||||
|
add_cmake_opts "-G\"$GENERATOR\" -A x64"
|
||||||
|
else
|
||||||
|
add_cmake_opts "-G\"$GENERATOR\" -A Win32"
|
||||||
|
fi
|
||||||
|
else
|
||||||
add_cmake_opts "-G\"$GENERATOR\""
|
add_cmake_opts "-G\"$GENERATOR\""
|
||||||
|
fi
|
||||||
|
|
||||||
if [ -n "$NMAKE" ]; then
|
if [ -n "$NMAKE" ]; then
|
||||||
add_cmake_opts "-DCMAKE_BUILD_TYPE=${BUILD_CONFIG}"
|
add_cmake_opts "-DCMAKE_BUILD_TYPE=${BUILD_CONFIG}"
|
||||||
|
@ -351,9 +380,9 @@ if [ -z $SKIP_DOWNLOAD ]; then
|
||||||
|
|
||||||
# Boost
|
# Boost
|
||||||
if [ -z $APPVEYOR ]; then
|
if [ -z $APPVEYOR ]; then
|
||||||
download "Boost 1.67.0" \
|
download "Boost ${BOOST_VER}" \
|
||||||
"https://sourceforge.net/projects/boost/files/boost-binaries/1.67.0/boost_1_67_0-msvc-${MSVC_VER}-${BITS}.exe" \
|
"https://sourceforge.net/projects/boost/files/boost-binaries/${BOOST_VER}/boost_${BOOST_VER_URL}-msvc-${MSVC_VER}-${BITS}.exe" \
|
||||||
"boost-1.67.0-msvc${MSVC_VER}-win${BITS}.exe"
|
"boost-${BOOST_VER}-msvc${MSVC_VER}-win${BITS}.exe"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Bullet
|
# Bullet
|
||||||
|
@ -444,13 +473,9 @@ echo
|
||||||
|
|
||||||
# Boost
|
# Boost
|
||||||
if [ -z $APPVEYOR ]; then
|
if [ -z $APPVEYOR ]; then
|
||||||
printf "Boost 1.67.0... "
|
printf "Boost ${BOOST_VER}... "
|
||||||
else
|
else
|
||||||
if [ "${MSVC_VER}" -eq 12.0 ]; then
|
printf "Boost ${BOOST_VER} AppVeyor... "
|
||||||
printf "Boost 1.58.0 AppVeyor... "
|
|
||||||
else
|
|
||||||
printf "Boost 1.67.0 AppVeyor... "
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
{
|
{
|
||||||
if [ -z $APPVEYOR ]; then
|
if [ -z $APPVEYOR ]; then
|
||||||
|
@ -468,13 +493,13 @@ fi
|
||||||
exit 1;
|
exit 1;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -d ${BOOST_SDK} ] && grep "BOOST_VERSION 106700" Boost/boost/version.hpp > /dev/null; then
|
if [ -d ${BOOST_SDK} ] && grep "BOOST_VERSION ${BOOST_VER_SDK}" Boost/boost/version.hpp > /dev/null; then
|
||||||
printf "Exists. "
|
printf "Exists. "
|
||||||
elif [ -z $SKIP_EXTRACT ]; then
|
elif [ -z $SKIP_EXTRACT ]; then
|
||||||
rm -rf Boost
|
rm -rf Boost
|
||||||
CI_EXTRA_INNO_OPTIONS=""
|
CI_EXTRA_INNO_OPTIONS=""
|
||||||
[ -n "$CI" ] && CI_EXTRA_INNO_OPTIONS="//SUPPRESSMSGBOXES //LOG='boost_install.log'"
|
[ -n "$CI" ] && CI_EXTRA_INNO_OPTIONS="//SUPPRESSMSGBOXES //LOG='boost_install.log'"
|
||||||
"${DEPS}/boost-1.67.0-msvc${MSVC_VER}-win${BITS}.exe" //DIR="${CWD_DRIVE_ROOT}" //VERYSILENT //NORESTART ${CI_EXTRA_INNO_OPTIONS}
|
"${DEPS}/boost-${BOOST_VER}-msvc${MSVC_VER}-win${BITS}.exe" //DIR="${CWD_DRIVE_ROOT}" //VERYSILENT //NORESTART ${CI_EXTRA_INNO_OPTIONS}
|
||||||
mv "${CWD_DRIVE_ROOT_BASH}" "${BOOST_SDK}"
|
mv "${CWD_DRIVE_ROOT_BASH}" "${BOOST_SDK}"
|
||||||
fi
|
fi
|
||||||
add_cmake_opts -DBOOST_ROOT="$BOOST_SDK" \
|
add_cmake_opts -DBOOST_ROOT="$BOOST_SDK" \
|
||||||
|
@ -483,11 +508,8 @@ fi
|
||||||
echo Done.
|
echo Done.
|
||||||
else
|
else
|
||||||
# Appveyor unstable has all the boost we need already
|
# Appveyor unstable has all the boost we need already
|
||||||
if [ $MSVC_REAL_VER -eq 12 ]; then
|
BOOST_SDK="c:/Libraries/boost_${BOOST_VER_URL}"
|
||||||
BOOST_SDK="c:/Libraries/boost_1_58_0"
|
|
||||||
else
|
|
||||||
BOOST_SDK="c:/Libraries/boost_1_67_0"
|
|
||||||
fi
|
|
||||||
if [ $MSVC_REAL_VER -eq 15 ]; then
|
if [ $MSVC_REAL_VER -eq 15 ]; then
|
||||||
LIB_SUFFIX="1"
|
LIB_SUFFIX="1"
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue