summaryrefslogtreecommitdiffstats
path: root/qmake/generators
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2021-11-09 15:06:18 +0100
committerJoerg Bornemann <joerg.bornemann@qt.io>2021-11-10 14:47:42 +0100
commit3582116a6036fc04d7895e33a853348b37598117 (patch)
tree90b8a61c82227c10967e8f4c5557b1bc88bf3299 /qmake/generators
parent1c880752eb891e77c3d3b5ffbf60fbb9109120fb (diff)
qmake: Introduce the variable MSVC_TOOLSET_VER
...which represents the version of the MSVC platform toolset. This variable is used to set the platform toolset version in .vcxproj files. Before, the platform toolset version was determined in qmake's C++ code. Now, it's set next to where MSVC_VER is set in common mkspecs .conf files. This will simplify supporting new Visual Studio versions in the future. Change-Id: If78c921f93c6378829746d617c7e7d312174257e Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'qmake/generators')
-rw-r--r--qmake/generators/win32/msvc_vcproj.cpp18
1 files changed, 1 insertions, 17 deletions
diff --git a/qmake/generators/win32/msvc_vcproj.cpp b/qmake/generators/win32/msvc_vcproj.cpp
index f89a3db87b..08e9b759df 100644
--- a/qmake/generators/win32/msvc_vcproj.cpp
+++ b/qmake/generators/win32/msvc_vcproj.cpp
@@ -301,23 +301,7 @@ QString VcprojGenerator::retrievePlatformToolSet() const
if (!envVar.isEmpty())
return envVar;
- switch (vcProject.Configuration.CompilerVersion)
- {
- case NET2012:
- return QStringLiteral("v110");
- case NET2013:
- return QStringLiteral("v120");
- case NET2015:
- return QStringLiteral("v140");
- case NET2017:
- return QStringLiteral("v141");
- case NET2019:
- return QStringLiteral("v142");
- case NET2022:
- return QStringLiteral("v143");
- default:
- return QString();
- }
+ return u"v"_qs + project->first("MSVC_TOOLSET_VER");
}
bool VcprojGenerator::isStandardSuffix(const QString &suffix) const