qmake vcproj: Support setting the SDK version

This adds the required members to allow setting the SDK version, and uses
them when creating WinRT projects.

Task-number: QTBUG-35328

Change-Id: I500ea77c41e27cbcc850462034c0eba8c5d1f124
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
This commit is contained in:
Andrew Knight 2013-12-29 14:54:48 +02:00 committed by The Qt Project
parent fe73b92ed0
commit d5e52ecf6d
3 changed files with 16 additions and 11 deletions

View File

@ -632,19 +632,20 @@ void VCXProjectWriter::write(XmlOutput &xml, VCProject &tool)
<< tagValue("RootNamespace", tool.Name)
<< tagValue("Keyword", tool.Keyword);
if (tool.SingleProjects.at(0).Configuration.WinRT) {
xml << tagValue("MinimumVisualStudioVersion", "11.0");
if (tool.SingleProjects.at(0).Configuration.WinPhone)
if (isWinRT) {
xml << tagValue("MinimumVisualStudioVersion", tool.Version);
if (isPhone) {
xml << tagValue("WinMDAssembly", "true");
else
xml << tagValue("AppContainerApplication", "true");
}
if (tool.SingleProjects.at(0).Configuration.WinPhone
&& tool.SingleProjects.at(0).Configuration.ConfigurationType == typeApplication) {
if (tool.SingleProjects.at(0).Configuration.ConfigurationType == typeApplication) {
xml << tagValue("XapOutputs", "true");
xml << tagValue("XapFilename", "$(RootNamespace)_$(Configuration)_$(Platform).xap");
}
} else {
xml << tagValue("AppContainerApplication", "true")
<< tagValue("ApplicationType", "Windows Store")
<< tagValue("ApplicationTypeRevision", tool.SdkVersion);
}
}
xml << closetag();

View File

@ -990,6 +990,7 @@ public:
QString SccProjectName;
QString SccLocalPath;
QString PlatformName;
QString SdkVersion;
// XML sub-parts
VCConfiguration Configuration;
@ -1129,6 +1130,7 @@ public:
QString SccProjectName;
QString SccLocalPath;
QString PlatformName;
QString SdkVersion;
// Single projects
QList<VCProjectSingleConfig> SingleProjects;

View File

@ -289,6 +289,7 @@ bool VcprojGenerator::writeProjectMakefile()
mergedProjects.at(0)->writePrlFile();
mergedProject.Name = project->first("QMAKE_PROJECT_NAME").toQString();
mergedProject.Version = mergedProjects.at(0)->vcProject.Version;
mergedProject.SdkVersion = mergedProjects.at(0)->vcProject.SdkVersion;
mergedProject.ProjectGUID = project->isEmpty("QMAKE_UUID") ? getProjectUUID().toString().toUpper() : project->first("QMAKE_UUID").toQString();
mergedProject.Keyword = project->first("VCPROJ_KEYWORD").toQString();
mergedProject.SccProjectName = mergedProjects.at(0)->vcProject.SccProjectName;
@ -915,6 +916,7 @@ void VcprojGenerator::initProject()
} else {
vcProject.PlatformName = project->values("CE_SDK").join(' ') + " (" + project->first("CE_ARCH") + ")";
}
vcProject.SdkVersion = project->first("WINSDK_VER").toQString();
// These are not used by Qt, but may be used by customers
vcProject.SccProjectName = project->first("SCCPROJECTNAME").toQString();
vcProject.SccLocalPath = project->first("SCCLOCALPATH").toQString();