qmake vc(x)proj generator: support x64 Qt builds
Task-number: QTBUG-17911 Reviewed-by: ossi
This commit is contained in:
parent
c6fc5395ad
commit
61e6639c82
@ -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") + ")";
|
||||||
}
|
}
|
||||||
|
@ -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 &);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user