summaryrefslogtreecommitdiffstats
path: root/qmake
diff options
context:
space:
mode:
Diffstat (limited to 'qmake')
-rw-r--r--qmake/generators/win32/msbuild_objectmodel.cpp19
-rw-r--r--qmake/generators/win32/msbuild_objectmodel.h1
-rw-r--r--qmake/generators/win32/msvc_objectmodel.h3
-rw-r--r--qmake/generators/win32/msvc_vcproj.cpp12
4 files changed, 34 insertions, 1 deletions
diff --git a/qmake/generators/win32/msbuild_objectmodel.cpp b/qmake/generators/win32/msbuild_objectmodel.cpp
index 5df4718..dc6755d 100644
--- a/qmake/generators/win32/msbuild_objectmodel.cpp
+++ b/qmake/generators/win32/msbuild_objectmodel.cpp
@@ -450,6 +450,10 @@ void VCXProjectWriter::write(XmlOutput &xml, VCProjectSingleConfig &tool)
<< attrTag("Condition", condition)
<< valueTag(tool.Configuration.IntermediateDirectory);
}
+ if (tool.Configuration.CompilerVersion >= NET2012) {
+ xml << tagValue("PlatformToolSet",
+ platformToolSetVersion(tool.Configuration.CompilerVersion));
+ }
if ( !tool.Configuration.PrimaryOutput.isEmpty() ) {
xml<< tag("TargetName")
<< attrTag("Condition", condition)
@@ -645,6 +649,10 @@ void VCXProjectWriter::write(XmlOutput &xml, VCProject &tool)
<< attrTag("Condition", condition)
<< valueTag(config.IntermediateDirectory);
}
+ if (config.CompilerVersion >= NET2012) {
+ xml << tagValue("PlatformToolSet",
+ platformToolSetVersion(config.CompilerVersion));
+ }
if (!config.PrimaryOutput.isEmpty()) {
xml << tag("TargetName")
<< attrTag("Condition", condition)
@@ -1959,4 +1967,15 @@ QString VCXProjectWriter::generateCondition(const VCConfiguration &config)
return QLatin1String("'$(Configuration)|$(Platform)'=='") + config.Name + QLatin1Char('\'');
}
+QString VCXProjectWriter::platformToolSetVersion(const DotNET version)
+{
+ switch (version)
+ {
+ case NET2012:
+ return "v110";
+ }
+ Q_ASSERT(!"This MSVC version does not support the PlatformToolSet tag!");
+ return QString();
+}
+
QT_END_NAMESPACE
diff --git a/qmake/generators/win32/msbuild_objectmodel.h b/qmake/generators/win32/msbuild_objectmodel.h
index ed3778d..8be1284 100644
--- a/qmake/generators/win32/msbuild_objectmodel.h
+++ b/qmake/generators/win32/msbuild_objectmodel.h
@@ -183,6 +183,7 @@ private:
static void outputFileConfigs(VCProject &project, XmlOutput &xml, XmlOutput &xmlFilter, const VCFilterFile &info, const QString &filtername);
static bool outputFileConfig(VCFilter &filter, XmlOutput &xml, XmlOutput &xmlFilter, const QString &filename, const QString &filtername, bool fileAllreadyAdded);
static QString generateCondition(const VCConfiguration &config);
+ static QString platformToolSetVersion(const DotNET version);
friend class XTreeNode;
friend class XFlatNode;
diff --git a/qmake/generators/win32/msvc_objectmodel.h b/qmake/generators/win32/msvc_objectmodel.h
index 23d0bc3..814ca7a 100644
--- a/qmake/generators/win32/msvc_objectmodel.h
+++ b/qmake/generators/win32/msvc_objectmodel.h
@@ -59,7 +59,8 @@ enum DotNET {
NET2003 = 0x71,
NET2005 = 0x80,
NET2008 = 0x90,
- NET2010 = 0xa0
+ NET2010 = 0xa0,
+ NET2012 = 0xb0
};
/*
diff --git a/qmake/generators/win32/msvc_vcproj.cpp b/qmake/generators/win32/msvc_vcproj.cpp
index 56f004e..1a1ad91 100644
--- a/qmake/generators/win32/msvc_vcproj.cpp
+++ b/qmake/generators/win32/msvc_vcproj.cpp
@@ -76,6 +76,8 @@ struct {
const char *regKey;
} dotNetCombo[] = {
#ifdef Q_OS_WIN64
+ {NET2012, "MSVC.NET 2012 (11.0)", "Software\\Wow6432Node\\Microsoft\\VisualStudio\\11.0\\Setup\\VC\\ProductDir"},
+ {NET2012, "MSVC.NET 2012 Express Edition (11.0)", "Software\\Wow6432Node\\Microsoft\\VCExpress\\11.0\\Setup\\VC\\ProductDir"},
{NET2010, "MSVC.NET 2010 (10.0)", "Software\\Wow6432Node\\Microsoft\\VisualStudio\\10.0\\Setup\\VC\\ProductDir"},
{NET2010, "MSVC.NET 2010 Express Edition (10.0)", "Software\\Wow6432Node\\Microsoft\\VCExpress\\10.0\\Setup\\VC\\ProductDir"},
{NET2008, "MSVC.NET 2008 (9.0)", "Software\\Wow6432Node\\Microsoft\\VisualStudio\\9.0\\Setup\\VC\\ProductDir"},
@@ -85,6 +87,8 @@ struct {
{NET2003, "MSVC.NET 2003 (7.1)", "Software\\Wow6432Node\\Microsoft\\VisualStudio\\7.1\\Setup\\VC\\ProductDir"},
{NET2002, "MSVC.NET 2002 (7.0)", "Software\\Wow6432Node\\Microsoft\\VisualStudio\\7.0\\Setup\\VC\\ProductDir"},
#else
+ {NET2012, "MSVC.NET 2012 (11.0)", "Software\\Microsoft\\VisualStudio\\11.0\\Setup\\VC\\ProductDir"},
+ {NET2012, "MSVC.NET 2012 Express Edition (11.0)", "Software\\Microsoft\\VCExpress\\11.0\\Setup\\VC\\ProductDir"},
{NET2010, "MSVC.NET 2010 (10.0)", "Software\\Microsoft\\VisualStudio\\10.0\\Setup\\VC\\ProductDir"},
{NET2010, "MSVC.NET 2010 Express Edition (10.0)", "Software\\Microsoft\\VCExpress\\10.0\\Setup\\VC\\ProductDir"},
{NET2008, "MSVC.NET 2008 (9.0)", "Software\\Microsoft\\VisualStudio\\9.0\\Setup\\VC\\ProductDir"},
@@ -176,6 +180,8 @@ const char _slnHeader90[] = "Microsoft Visual Studio Solution File, Format
"\n# Visual Studio 2008";
const char _slnHeader100[] = "Microsoft Visual Studio Solution File, Format Version 11.00"
"\n# Visual Studio 2010";
+const char _slnHeader110[] = "Microsoft Visual Studio Solution File, Format Version 12.00"
+ "\n# Visual Studio 2012";
// The following UUID _may_ change for later servicepacks...
// If so we need to search through the registry at
// HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\7.0\Projects
@@ -392,6 +398,9 @@ void VcprojGenerator::writeSubDirs(QTextStream &t)
}
switch(which_dotnet_version()) {
+ case NET2012:
+ t << _slnHeader110;
+ break;
case NET2010:
t << _slnHeader100;
break;
@@ -815,6 +824,9 @@ void VcprojGenerator::initProject()
// Own elements -----------------------------
vcProject.Name = unescapeFilePath(project->first("QMAKE_ORIG_TARGET"));
switch(which_dotnet_version()) {
+ case NET2012:
+ vcProject.Version = "12.00";
+ break;
case NET2010:
vcProject.Version = "10.00";
break;