qmake vcxproj generator: Update platform toolset and solution header for VS 2019

Change-Id: Id01f28f2ef3e271fa48dddf5f8ccb6b057180aa0
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
This commit is contained in:
Joerg Bornemann 2019-02-12 09:23:28 +01:00 committed by Oliver Wolff
parent 896b307679
commit 4aafe68e1a
3 changed files with 14 additions and 2 deletions

View File

@ -55,7 +55,8 @@ static DotNET vsVersionFromString(const char *versionString)
{ "11.0", NET2012 }, { "11.0", NET2012 },
{ "12.0", NET2013 }, { "12.0", NET2013 },
{ "14.0", NET2015 }, { "14.0", NET2015 },
{ "15.0", NET2017 } { "15.0", NET2017 },
{ "16.0", NET2019 }
}; };
DotNET result = NETUnknown; DotNET result = NETUnknown;
for (const auto entry : mapping) { for (const auto entry : mapping) {

View File

@ -52,7 +52,8 @@ enum DotNET {
NET2012 = 0xb0, NET2012 = 0xb0,
NET2013 = 0xc0, NET2013 = 0xc0,
NET2015 = 0xd0, NET2015 = 0xd0,
NET2017 = 0xe0 NET2017 = 0xe0,
NET2019
}; };
DotNET vsVersionFromString(const ProString &versionString); DotNET vsVersionFromString(const ProString &versionString);

View File

@ -74,6 +74,8 @@ const char _slnHeader140[] = "Microsoft Visual Studio Solution File, Format
"\n# Visual Studio 2015"; "\n# Visual Studio 2015";
const char _slnHeader141[] = "Microsoft Visual Studio Solution File, Format Version 12.00" const char _slnHeader141[] = "Microsoft Visual Studio Solution File, Format Version 12.00"
"\n# Visual Studio 2017"; "\n# Visual Studio 2017";
const char _slnHeader142[] = "Microsoft Visual Studio Solution File, Format Version 12.00"
"\n# Visual Studio Version 16";
// The following UUID _may_ change for later servicepacks... // The following UUID _may_ change for later servicepacks...
// If so we need to search through the registry at // If so we need to search through the registry at
// HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\7.0\Projects // HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\7.0\Projects
@ -301,6 +303,8 @@ QString VcprojGenerator::retrievePlatformToolSet() const
return QStringLiteral("v140"); return QStringLiteral("v140");
case NET2017: case NET2017:
return QStringLiteral("v141"); return QStringLiteral("v141");
case NET2019:
return QStringLiteral("v142");
default: default:
return QString(); return QString();
} }
@ -527,6 +531,9 @@ void VcprojGenerator::writeSubDirs(QTextStream &t)
} }
switch (vcProject.Configuration.CompilerVersion) { switch (vcProject.Configuration.CompilerVersion) {
case NET2019:
t << _slnHeader142;
break;
case NET2017: case NET2017:
t << _slnHeader141; t << _slnHeader141;
break; break;
@ -874,6 +881,9 @@ void VcprojGenerator::initProject()
// Own elements ----------------------------- // Own elements -----------------------------
vcProject.Name = project->first("QMAKE_ORIG_TARGET").toQString(); vcProject.Name = project->first("QMAKE_ORIG_TARGET").toQString();
switch (vcProject.Configuration.CompilerVersion) { switch (vcProject.Configuration.CompilerVersion) {
case NET2019:
vcProject.Version = "16.00";
break;
case NET2017: case NET2017:
vcProject.Version = "15.00"; vcProject.Version = "15.00";
break; break;