summaryrefslogtreecommitdiffstats
path: root/qmake/generators/win32/msbuild_objectmodel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qmake/generators/win32/msbuild_objectmodel.cpp')
-rw-r--r--qmake/generators/win32/msbuild_objectmodel.cpp72
1 files changed, 27 insertions, 45 deletions
diff --git a/qmake/generators/win32/msbuild_objectmodel.cpp b/qmake/generators/win32/msbuild_objectmodel.cpp
index 2f98eae075..6c2d2c6206 100644
--- a/qmake/generators/win32/msbuild_objectmodel.cpp
+++ b/qmake/generators/win32/msbuild_objectmodel.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the qmake application of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -571,6 +571,7 @@ void VCXProjectWriter::write(XmlOutput &xml, VCProjectSingleConfig &tool)
addFilters(tempProj, xmlFilter, "Source Files");
addFilters(tempProj, xmlFilter, "Translation Files");
addFilters(tempProj, xmlFilter, "Deployment Files");
+ addFilters(tempProj, xmlFilter, "Distribution Files");
for (int x = 0; x < tempProj.ExtraCompilers.count(); ++x)
addFilters(tempProj, xmlFilter, tempProj.ExtraCompilers.at(x));
@@ -585,6 +586,7 @@ void VCXProjectWriter::write(XmlOutput &xml, VCProjectSingleConfig &tool)
outputFilter(tempProj, xml, xmlFilter, "Form Files");
outputFilter(tempProj, xml, xmlFilter, "Resource Files");
outputFilter(tempProj, xml, xmlFilter, "Deployment Files");
+ outputFilter(tempProj, xml, xmlFilter, "Distribution Files");
for (int x = 0; x < tempProj.ExtraCompilers.count(); ++x) {
outputFilter(tempProj, xml, xmlFilter, tempProj.ExtraCompilers.at(x));
@@ -616,7 +618,6 @@ void VCXProjectWriter::write(XmlOutput &xml, VCProject &tool)
bool isWinRT = false;
bool isWinPhone = false;
- bool isWinPhone80 = false; // ### Windows Phone 8.0, remove in Qt 5.4
for (int i = 0; i < tool.SingleProjects.count(); ++i) {
xml << tag("ProjectConfiguration")
<< attrTag("Include" , tool.SingleProjects.at(i).Configuration.Name)
@@ -625,7 +626,6 @@ void VCXProjectWriter::write(XmlOutput &xml, VCProject &tool)
<< closetag();
isWinRT = isWinRT || tool.SingleProjects.at(i).Configuration.WinRT;
isWinPhone = isWinPhone = tool.SingleProjects.at(i).Configuration.WinPhone;
- isWinPhone80 = isWinPhone80 || tool.SingleProjects.at(i).Configuration.WinPhone80;
}
xml << closetag()
@@ -637,18 +637,10 @@ void VCXProjectWriter::write(XmlOutput &xml, VCProject &tool)
if (isWinRT) {
xml << tagValue("MinimumVisualStudioVersion", tool.Version)
- << tagValue("DefaultLanguage", "en");
- if (isWinPhone80) {
- xml << tagValue("WinMDAssembly", "true");
- 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", isWinPhone ? "Windows Phone" : "Windows Store")
- << tagValue("ApplicationTypeRevision", tool.SdkVersion);
- }
+ << tagValue("DefaultLanguage", "en")
+ << tagValue("AppContainerApplication", "true")
+ << tagValue("ApplicationType", isWinPhone ? "Windows Phone" : "Windows Store")
+ << tagValue("ApplicationTypeRevision", tool.SdkVersion);
}
xml << closetag();
@@ -814,6 +806,7 @@ void VCXProjectWriter::write(XmlOutput &xml, VCProject &tool)
addFilters(tool, xmlFilter, "Source Files");
addFilters(tool, xmlFilter, "Translation Files");
addFilters(tool, xmlFilter, "Deployment Files");
+ addFilters(tool, xmlFilter, "Distribution Files");
for (int x = 0; x < tool.ExtraCompilers.count(); ++x)
addFilters(tool, xmlFilter, tool.ExtraCompilers.at(x));
@@ -828,24 +821,15 @@ void VCXProjectWriter::write(XmlOutput &xml, VCProject &tool)
outputFilter(tool, xml, xmlFilter, "Form Files");
outputFilter(tool, xml, xmlFilter, "Resource Files");
outputFilter(tool, xml, xmlFilter, "Deployment Files");
+ outputFilter(tool, xml, xmlFilter, "Distribution Files");
for (int x = 0; x < tool.ExtraCompilers.count(); ++x) {
outputFilter(tool, xml, xmlFilter, tool.ExtraCompilers.at(x));
}
outputFilter(tool, xml, xmlFilter, "Root Files");
- if (isWinPhone80) {
- xml << tag("ItemGroup")
- << tag("Reference")
- << attrTag("Include", "platform")
- << attrTagS("IsWinMDFile", "true")
- << attrTagS("Private", "false")
- << closetag()
- << closetag();
- }
-
// App manifest
if (isWinRT) {
- QString manifest = isWinPhone80 ? QStringLiteral("WMAppManifest.xml") : QStringLiteral("Package.appxmanifest");
+ const QString manifest = QStringLiteral("Package.appxmanifest");
// Find all icons referenced in the manifest
QSet<QString> icons;
@@ -866,7 +850,7 @@ void VCXProjectWriter::write(XmlOutput &xml, VCProject &tool)
// Write out manifest + icons as content items
xml << tag(_ItemGroup)
- << tag(isWinPhone80 ? "Xml" : "AppxManifest")
+ << tag("AppxManifest")
<< attrTag("Include", manifest)
<< closetag();
foreach (const QString &icon, icons) {
@@ -877,12 +861,8 @@ void VCXProjectWriter::write(XmlOutput &xml, VCProject &tool)
xml << closetag();
}
- xml << import("Project", "$(VCTargetsPath)\\Microsoft.Cpp.targets");
-
- if (isWinPhone80)
- xml << import("Project", "$(MSBuildExtensionsPath)\\Microsoft\\WindowsPhone\\v8.0\\Microsoft.Cpp.WindowsPhone.8.0.targets");
-
- xml << tag("ImportGroup")
+ xml << import("Project", "$(VCTargetsPath)\\Microsoft.Cpp.targets")
+ << tag("ImportGroup")
<< attrTag("Label", "ExtensionTargets")
<< closetag();
}
@@ -1935,11 +1915,11 @@ bool VCXProjectWriter::outputFileConfig(OutputFilterData *d, XmlOutput &xml, Xml
fileAdded = true;
xmlFilter << tag("CustomBuild")
- << attrTag("Include",Option::fixPathToLocalOS(filename))
+ << attrTag("Include", Option::fixPathToTargetOS(filename))
<< attrTagS("Filter", fullFilterName);
xml << tag("CustomBuild")
- << attrTag("Include",Option::fixPathToLocalOS(filename));
+ << attrTag("Include", Option::fixPathToTargetOS(filename));
if (filter.Name.startsWith("Form Files")
|| filter.Name.startsWith("Generated Files")
@@ -1979,11 +1959,13 @@ bool VCXProjectWriter::outputFileConfig(OutputFilterData *d, XmlOutput &xml, Xml
}
if ( !filter.CompilerTool.PrecompiledHeaderThrough.isEmpty() ) {
-
xml << tag("PrecompiledHeaderFile")
<< attrTag("Condition", condition)
- << valueTag(filter.CompilerTool.PrecompiledHeaderThrough)
- << tag("PrecompiledHeader")
+ << valueTag(filter.CompilerTool.PrecompiledHeaderThrough);
+ }
+
+ if (filter.CompilerTool.UsePrecompiledHeader != pchUnset) {
+ xml << tag("PrecompiledHeader")
<< attrTag("Condition", condition)
<< valueTag(toString(filter.CompilerTool.UsePrecompiledHeader));
}
@@ -1996,7 +1978,7 @@ bool VCXProjectWriter::outputFileConfig(OutputFilterData *d, XmlOutput &xml, Xml
void VCXProjectWriter::outputFileConfig(XmlOutput &xml, XmlOutput &xmlFilter,
const QString &filePath, const QString &filterName)
{
- const QString nativeFilePath = Option::fixPathToLocalOS(filePath);
+ const QString nativeFilePath = Option::fixPathToTargetOS(filePath);
if (filterName.startsWith("Source Files")) {
xmlFilter << tag("ClCompile")
<< attrTag("Include", nativeFilePath)