qmake: added VCPROJ_ARCH variable.
It's a generic way to configure the Visual Studio Solution architecture. It's added to support different project architectures, ARM specifically. It may be a good idea to replace the Win32 and x64 with VCPROJ_ARCH=Win32 and VCPROJ_ARCH=x64 defined in corresponding qmakespecs. Change-Id: I9b23f7393bf248a629c425187d6dd8859092c45c Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
This commit is contained in:
parent
036cfadcc6
commit
48ba0389ee
@ -679,7 +679,9 @@ void VcprojGenerator::writeSubDirs(QTextStream &t)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
QString slnConf = _slnSolutionConf;
|
QString slnConf = _slnSolutionConf;
|
||||||
if (!project->isEmpty("CE_SDK") && !project->isEmpty("CE_ARCH")) {
|
if (!project->isEmpty("VCPROJ_ARCH")) {
|
||||||
|
slnConf.replace(QString("|Win32"), "|" + project->first("VCPROJ_ARCH"));
|
||||||
|
} else if (!project->isEmpty("CE_SDK") && !project->isEmpty("CE_ARCH")) {
|
||||||
QString slnPlatform = QString("|") + project->values("CE_SDK").join(' ') + " (" + project->first("CE_ARCH") + ")";
|
QString slnPlatform = QString("|") + project->values("CE_SDK").join(' ') + " (" + project->first("CE_ARCH") + ")";
|
||||||
slnConf.replace(QString("|Win32"), slnPlatform);
|
slnConf.replace(QString("|Win32"), slnPlatform);
|
||||||
} else if (is64Bit) {
|
} else if (is64Bit) {
|
||||||
@ -694,8 +696,11 @@ void VcprojGenerator::writeSubDirs(QTextStream &t)
|
|||||||
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 = is64Bit ? "x64" : "Win32";
|
QString platform = is64Bit ? "x64" : "Win32";
|
||||||
QString xplatform = platform;
|
QString xplatform = platform;
|
||||||
if (!project->isEmpty("CE_SDK") && !project->isEmpty("CE_ARCH"))
|
if (!project->isEmpty("VCPROJ_ARCH")) {
|
||||||
|
xplatform = project->first("VCPROJ_ARCH").toQString();
|
||||||
|
} else if (!project->isEmpty("CE_SDK") && !project->isEmpty("CE_ARCH")) {
|
||||||
xplatform = project->values("CE_SDK").join(' ') + " (" + project->first("CE_ARCH") + ")";
|
xplatform = project->values("CE_SDK").join(' ') + " (" + project->first("CE_ARCH") + ")";
|
||||||
|
}
|
||||||
if (!project->isHostBuild())
|
if (!project->isHostBuild())
|
||||||
platform = xplatform;
|
platform = xplatform;
|
||||||
t << "\n\t\t" << (*it)->uuid << QString(_slnProjDbgConfTag1).arg(xplatform) << platform;
|
t << "\n\t\t" << (*it)->uuid << QString(_slnProjDbgConfTag1).arg(xplatform) << platform;
|
||||||
@ -907,7 +912,9 @@ void VcprojGenerator::initProject()
|
|||||||
}
|
}
|
||||||
|
|
||||||
vcProject.Keyword = project->first("VCPROJ_KEYWORD").toQString();
|
vcProject.Keyword = project->first("VCPROJ_KEYWORD").toQString();
|
||||||
if (project->isHostBuild() || project->isEmpty("CE_SDK") || project->isEmpty("CE_ARCH")) {
|
if (!project->isEmpty("VCPROJ_ARCH")) {
|
||||||
|
vcProject.PlatformName = project->first("VCPROJ_ARCH").toQString();
|
||||||
|
} else if (project->isHostBuild() || project->isEmpty("CE_SDK") || project->isEmpty("CE_ARCH")) {
|
||||||
vcProject.PlatformName = (is64Bit ? "x64" : "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") + ")";
|
||||||
@ -978,7 +985,9 @@ void VcprojGenerator::initConfiguration()
|
|||||||
if (conf.Name.isEmpty())
|
if (conf.Name.isEmpty())
|
||||||
conf.Name = isDebug ? "Debug" : "Release";
|
conf.Name = isDebug ? "Debug" : "Release";
|
||||||
conf.ConfigurationName = conf.Name;
|
conf.ConfigurationName = conf.Name;
|
||||||
if (project->isHostBuild() || project->isEmpty("CE_SDK") || project->isEmpty("CE_ARCH")) {
|
if (!project->isEmpty("VCPROJ_ARCH")) {
|
||||||
|
conf.Name += "|" + project->first("VCPROJ_ARCH");
|
||||||
|
} else if (project->isHostBuild() || project->isEmpty("CE_SDK") || project->isEmpty("CE_ARCH")) {
|
||||||
conf.Name += (is64Bit ? "|x64" : "|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") + ")";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user