summaryrefslogtreecommitdiffstats
path: root/qmake
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@nokia.com>2010-08-06 12:24:15 (GMT)
committerJoerg Bornemann <joerg.bornemann@nokia.com>2010-08-10 08:53:05 (GMT)
commit021e7a437f7666e156db5a91e4ff191aa441cc60 (patch)
tree997b60a78f0be42a3bcedee1200f25c855fd12dd /qmake
parente0c21e2b9020a0996e077ddffb1ea632923095e4 (diff)
downloadQt-021e7a437f7666e156db5a91e4ff191aa441cc60.zip
Qt-021e7a437f7666e156db5a91e4ff191aa441cc60.tar.gz
Qt-021e7a437f7666e156db5a91e4ff191aa441cc60.tar.bz2
qmake: repair .vcxproj generation
Rubber-stamped-by: ossi
Diffstat (limited to 'qmake')
-rw-r--r--qmake/generators/win32/msbuild_objectmodel.cpp13
-rw-r--r--qmake/generators/win32/msvc_objectmodel.cpp7
-rw-r--r--qmake/generators/win32/msvc_vcproj.cpp12
3 files changed, 17 insertions, 15 deletions
diff --git a/qmake/generators/win32/msbuild_objectmodel.cpp b/qmake/generators/win32/msbuild_objectmodel.cpp
index c9ba248..a397ae9 100644
--- a/qmake/generators/win32/msbuild_objectmodel.cpp
+++ b/qmake/generators/win32/msbuild_objectmodel.cpp
@@ -1266,7 +1266,7 @@ void VCXProjectWriter::write(XmlOutput &xml, const VCCLCompilerTool &tool)
<< attrTagT(_OpenMPSupport, tool.OpenMP)
<< attrTagS(_Optimization, toString(tool.Optimization))
<< attrTagS(_PrecompiledHeader, toString(tool.UsePrecompiledHeader))
- << attrTagS(_PrecompiledHeaderFile, tool.PrecompiledHeaderFile)
+ << attrTagS(_PrecompiledHeaderFile, tool.PrecompiledHeaderThrough)
<< attrTagS(_PrecompiledHeaderOutputFile, tool.PrecompiledHeaderFile)
<< attrTagT(_PreprocessKeepComments, tool.KeepComments)
<< attrTagX(_PreprocessorDefinitions, tool.PreprocessorDefinitions, ";")
@@ -1791,6 +1791,7 @@ bool VCXProjectWriter::outputFileConfig(VCFilter &filter, XmlOutput &xml, XmlOut
filter.CompilerTool = VCCLCompilerTool();
// Unset some default options
+ filter.CustomBuildTool.config = filter.Config;
filter.CompilerTool.BufferSecurityCheck = unset;
filter.CompilerTool.DebugInformationFormat = debugUnknown;
filter.CompilerTool.ExceptionHandling = ehDefault;
@@ -1925,16 +1926,12 @@ bool VCXProjectWriter::outputFileConfig(VCFilter &filter, XmlOutput &xml, XmlOut
<< valueTagX(filter.CompilerTool.ForcedIncludeFiles);
}
- if ( !filter.CompilerTool.PrecompiledHeaderFile.isEmpty() ) {
+ if ( !filter.CompilerTool.PrecompiledHeaderThrough.isEmpty() ) {
xml << tag("PrecompiledHeaderFile")
<< attrTag("Condition", QString("'$(Configuration)|$(Platform)'=='%1'").arg(filter.Config->Name))
- << valueTag(filter.CompilerTool.PrecompiledHeaderFile);
- }
-
- if ( filter.CompilerTool.UsePrecompiledHeader ) {
-
- xml << tag("PrecompiledHeader")
+ << valueTag(filter.CompilerTool.PrecompiledHeaderThrough)
+ << tag("PrecompiledHeader")
<< attrTag("Condition", QString("'$(Configuration)|$(Platform)'=='%1'").arg(filter.Config->Name))
<< valueTag(toString(filter.CompilerTool.UsePrecompiledHeader));
}
diff --git a/qmake/generators/win32/msvc_objectmodel.cpp b/qmake/generators/win32/msvc_objectmodel.cpp
index 6e1ee8d..e001884 100644
--- a/qmake/generators/win32/msvc_objectmodel.cpp
+++ b/qmake/generators/win32/msvc_objectmodel.cpp
@@ -2110,9 +2110,9 @@ void VCFilter::modifyPCHstage(QString str)
lines << "*";
lines << "* This file is auto-generated by qmake since no PRECOMPILED_SOURCE was";
lines << "* specified, and is used as the common stdafx.cpp. The file is only";
- lines << "* generated when creating ";
- lines << (Config->CompilerVersion < NET2010 ? ".vcproj" : ".vcxproj");
- lines << " project files, and is not used for";
+ lines << QLatin1String("* generated when creating ")
+ + (Config->CompilerVersion < NET2010 ? ".vcproj" : ".vcxproj")
+ + " project files, and is not used for";
lines << "* command line compilations by nmake.";
lines << "*";
lines << "* WARNING: All changes made in this file will be lost.";
@@ -2865,6 +2865,7 @@ void VCProjectWriter::outputFileConfig(VCFilter &filter, XmlOutput &xml, const Q
filter.CompilerTool = VCCLCompilerTool();
// Unset some default options
+ filter.CustomBuildTool.config = filter.Config;
filter.CompilerTool.BufferSecurityCheck = unset;
filter.CompilerTool.DebugInformationFormat = debugUnknown;
filter.CompilerTool.ExceptionHandling = ehDefault;
diff --git a/qmake/generators/win32/msvc_vcproj.cpp b/qmake/generators/win32/msvc_vcproj.cpp
index 449dcb0..345bd3a 100644
--- a/qmake/generators/win32/msvc_vcproj.cpp
+++ b/qmake/generators/win32/msvc_vcproj.cpp
@@ -207,9 +207,9 @@ const char _slnExtSections[] = "\n\tGlobalSection(ExtensibilityGlobals) = pos
VcprojGenerator::VcprojGenerator()
: Win32MakefileGenerator(),
- init_flag(false)
+ init_flag(false),
+ projectWriter(0)
{
- projectWriter = createProjectWriter();
}
VcprojGenerator::~VcprojGenerator()
@@ -660,6 +660,7 @@ void VcprojGenerator::init()
if (init_flag)
return;
init_flag = true;
+ projectWriter = createProjectWriter();
if(project->first("TEMPLATE") == "vcsubdirs") //too much work for subdirs
return;
@@ -775,7 +776,7 @@ bool VcprojGenerator::mergeBuildProject(MakefileGenerator *other)
warn_msg(WarnLogic, "VcprojGenerator: Cannot merge null project.");
return false;
}
- if (other->projectFile()->first("MAKEFILE_GENERATOR") != "MSVC.NET") {
+ if (other->projectFile()->first("MAKEFILE_GENERATOR") != project->first("MAKEFILE_GENERATOR")) {
warn_msg(WarnLogic, "VcprojGenerator: Cannot merge other types of projects! (ignored)");
return false;
}
@@ -804,6 +805,9 @@ void VcprojGenerator::initProject()
// Own elements -----------------------------
vcProject.Name = unescapeFilePath(project->first("QMAKE_ORIG_TARGET"));
switch(which_dotnet_version()) {
+ case NET2010:
+ vcProject.Version = "10.00";
+ break;
case NET2008:
vcProject.Version = "9,00";
break;
@@ -888,6 +892,7 @@ void VcprojGenerator::initConfiguration()
conf.PrimaryOutput.append(project->first("TARGET_VERSION_EXT"));
} else {
conf.PrimaryOutput = project->first("PrimaryOutput");
+ conf.OutputDirectory = ".";
}
conf.Name = project->values("BUILD_NAME").join(" ");
@@ -906,7 +911,6 @@ void VcprojGenerator::initConfiguration()
conf.DeleteExtensionsOnClean = project->first("DeleteExtensionsOnClean");
conf.ImportLibrary = conf.linker.ImportLibrary;
conf.IntermediateDirectory = project->first("OBJECTS_DIR");
- conf.OutputDirectory = ".";
conf.WholeProgramOptimization = conf.compiler.WholeProgramOptimization;
temp = project->first("UseOfATL");
if(!temp.isEmpty())