Merge branch 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging

* 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging:
  qmake vc(x)proj generator: support x64 Qt builds
  qmake: remove dead code from VcxprojGenerator
This commit is contained in:
Qt Continuous Integration System 2011-05-06 19:53:21 +10:00
commit 629428a3c2
4 changed files with 14 additions and 37 deletions

View File

@ -208,6 +208,7 @@ const char _slnExtSections[] = "\n\tGlobalSection(ExtensibilityGlobals) = pos
VcprojGenerator::VcprojGenerator() VcprojGenerator::VcprojGenerator()
: Win32MakefileGenerator(), : Win32MakefileGenerator(),
init_flag(false), init_flag(false),
is64Bit(false),
projectWriter(0) projectWriter(0)
{ {
} }
@ -597,14 +598,16 @@ nextfile:
} }
} }
t << _slnGlobalBeg; t << _slnGlobalBeg;
QString slnConf = _slnSolutionConf;
if (!project->isEmpty("CE_SDK") && !project->isEmpty("CE_ARCH")) { if (!project->isEmpty("CE_SDK") && !project->isEmpty("CE_ARCH")) {
QString slnConfCE = _slnSolutionConf; QString slnPlatform = QString("|") + project->values("CE_SDK").join(" ") + " (" + project->first("CE_ARCH") + ")";
QString platform = QString("|") + project->values("CE_SDK").join(" ") + " (" + project->first("CE_ARCH") + ")"; slnConf.replace(QString("|Win32"), slnPlatform);
slnConfCE.replace(QString("|Win32"), platform); } else if (is64Bit) {
t << slnConfCE; slnConf.replace(QString("|Win32"), "|x64");
} else {
t << _slnSolutionConf;
} }
t << slnConf;
t << _slnProjDepBeg; t << _slnProjDepBeg;
// Restore previous after_user_var options // Restore previous after_user_var options
@ -621,7 +624,7 @@ nextfile:
t << _slnProjDepEnd; t << _slnProjDepEnd;
t << _slnProjConfBeg; t << _slnProjConfBeg;
for(QList<VcsolutionDepend*>::Iterator it = solution_cleanup.begin(); it != solution_cleanup.end(); ++it) { for(QList<VcsolutionDepend*>::Iterator it = solution_cleanup.begin(); it != solution_cleanup.end(); ++it) {
QString platform = "Win32"; QString platform = is64Bit ? "x64" : "Win32";
if (!project->isEmpty("CE_SDK") && !project->isEmpty("CE_ARCH")) if (!project->isEmpty("CE_SDK") && !project->isEmpty("CE_ARCH"))
platform = project->values("CE_SDK").join(" ") + " (" + project->first("CE_ARCH") + ")"; platform = project->values("CE_SDK").join(" ") + " (" + project->first("CE_ARCH") + ")";
t << "\n\t\t" << (*it)->uuid << QString(_slnProjDbgConfTag1).arg(platform) << platform; t << "\n\t\t" << (*it)->uuid << QString(_slnProjDbgConfTag1).arg(platform) << platform;
@ -661,6 +664,7 @@ void VcprojGenerator::init()
if (init_flag) if (init_flag)
return; return;
init_flag = true; init_flag = true;
is64Bit = (project->first("QMAKE_TARGET.arch") == "x86_64");
projectWriter = createProjectWriter(); projectWriter = createProjectWriter();
if(project->first("TEMPLATE") == "vcsubdirs") //too much work for subdirs if(project->first("TEMPLATE") == "vcsubdirs") //too much work for subdirs
@ -831,7 +835,7 @@ void VcprojGenerator::initProject()
vcProject.Keyword = project->first("VCPROJ_KEYWORD"); vcProject.Keyword = project->first("VCPROJ_KEYWORD");
if (project->isEmpty("CE_SDK") || project->isEmpty("CE_ARCH")) { if (project->isEmpty("CE_SDK") || project->isEmpty("CE_ARCH")) {
vcProject.PlatformName = (vcProject.Configuration.idl.TargetEnvironment == midlTargetWin64 ? "Win64" : "Win32"); vcProject.PlatformName = (is64Bit ? "x64" : "Win32");
} else { } else {
vcProject.PlatformName = project->values("CE_SDK").join(" ") + " (" + project->first("CE_ARCH") + ")"; vcProject.PlatformName = project->values("CE_SDK").join(" ") + " (" + project->first("CE_ARCH") + ")";
} }
@ -895,7 +899,7 @@ void VcprojGenerator::initConfiguration()
conf.Name = isDebug ? "Debug" : "Release"; conf.Name = isDebug ? "Debug" : "Release";
conf.ConfigurationName = conf.Name; conf.ConfigurationName = conf.Name;
if (project->isEmpty("CE_SDK") || project->isEmpty("CE_ARCH")) { if (project->isEmpty("CE_SDK") || project->isEmpty("CE_ARCH")) {
conf.Name += (conf.idl.TargetEnvironment == midlTargetWin64 ? "|Win64" : "|Win32"); conf.Name += (is64Bit ? "|x64" : "|Win32");
} else { } else {
conf.Name += "|" + project->values("CE_SDK").join(" ") + " (" + project->first("CE_ARCH") + ")"; conf.Name += "|" + project->values("CE_SDK").join(" ") + " (" + project->first("CE_ARCH") + ")";
} }

View File

@ -57,6 +57,7 @@ struct QUuid;
class VcprojGenerator : public Win32MakefileGenerator class VcprojGenerator : public Win32MakefileGenerator
{ {
bool init_flag; bool init_flag;
bool is64Bit;
bool writeVcprojParts(QTextStream &); bool writeVcprojParts(QTextStream &);
bool writeMakefile(QTextStream &); bool writeMakefile(QTextStream &);

View File

@ -41,25 +41,8 @@
#include "msvc_vcxproj.h" #include "msvc_vcxproj.h"
#include "msbuild_objectmodel.h" #include "msbuild_objectmodel.h"
#include <qdir.h>
#include <qdiriterator.h>
#include <quuid.h>
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
// Filter GUIDs (Do NOT change these!) ------------------------------
const char _GUIDSourceFiles[] = "{4FC737F1-C7A5-4376-A066-2A32D752A2FF}";
const char _GUIDHeaderFiles[] = "{93995380-89BD-4b04-88EB-625FBE52EBFB}";
const char _GUIDGeneratedFiles[] = "{71ED8ED8-ACB9-4CE9-BBE1-E00B30144E11}";
const char _GUIDResourceFiles[] = "{D9D6E242-F8AF-46E4-B9FD-80ECBC20BA3E}";
const char _GUIDLexYaccFiles[] = "{E12AE0D2-192F-4d59-BD23-7D3FA58D3183}";
const char _GUIDTranslationFiles[] = "{639EADAA-A684-42e4-A9AD-28FC9BCB8F7C}";
const char _GUIDFormFiles[] = "{99349809-55BA-4b9d-BF79-8FDBB0286EB3}";
const char _GUIDExtraCompilerFiles[] = "{E0D8C965-CC5F-43d7-AD63-FAEF0BBC0F85}";
QT_END_NAMESPACE
QT_BEGIN_NAMESPACE
VcxprojGenerator::VcxprojGenerator() : VcprojGenerator() VcxprojGenerator::VcxprojGenerator() : VcprojGenerator()
{ {
@ -71,4 +54,3 @@ VCProjectWriter *VcxprojGenerator::createProjectWriter()
} }
QT_END_NAMESPACE QT_END_NAMESPACE

View File

@ -42,8 +42,6 @@
#ifndef MSVC_VCXPROJ_H #ifndef MSVC_VCXPROJ_H
#define MSVC_VCXPROJ_H #define MSVC_VCXPROJ_H
#include "winmakefile.h"
#include "msbuild_objectmodel.h"
#include "msvc_vcproj.h" #include "msvc_vcproj.h"
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
@ -52,19 +50,11 @@ class VcxprojGenerator : public VcprojGenerator
{ {
public: public:
VcxprojGenerator(); VcxprojGenerator();
~VcxprojGenerator();
protected: protected:
virtual VCProjectWriter *createProjectWriter(); virtual VCProjectWriter *createProjectWriter();
private:
friend class VCFilter;
}; };
inline VcxprojGenerator::~VcxprojGenerator()
{ }
QT_END_NAMESPACE QT_END_NAMESPACE
#endif // MSVC_VCXPROJ_H #endif // MSVC_VCXPROJ_H