summaryrefslogtreecommitdiffstats
path: root/qmake
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2013-02-11 23:44:39 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-15 16:14:28 +0200
commit48ba0389eece8c4bde53b3a615347e0b459839e0 (patch)
treeb39d6d8fa1fc7e35eaeec50f53748b9715ccbd65 /qmake
parent036cfadcc690b797c3a9b68b026f08f95b82d5ca (diff)
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>
Diffstat (limited to 'qmake')
-rw-r--r--qmake/generators/win32/msvc_vcproj.cpp17
1 files changed, 13 insertions, 4 deletions
diff --git a/qmake/generators/win32/msvc_vcproj.cpp b/qmake/generators/win32/msvc_vcproj.cpp
index c4806f3e8f..9387eb39d4 100644
--- a/qmake/generators/win32/msvc_vcproj.cpp
+++ b/qmake/generators/win32/msvc_vcproj.cpp
@@ -679,7 +679,9 @@ void VcprojGenerator::writeSubDirs(QTextStream &t)
}
}
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") + ")";
slnConf.replace(QString("|Win32"), slnPlatform);
} 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) {
QString platform = is64Bit ? "x64" : "Win32";
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") + ")";
+ }
if (!project->isHostBuild())
platform = xplatform;
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();
- 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");
} else {
vcProject.PlatformName = project->values("CE_SDK").join(' ') + " (" + project->first("CE_ARCH") + ")";
@@ -978,7 +985,9 @@ void VcprojGenerator::initConfiguration()
if (conf.Name.isEmpty())
conf.Name = isDebug ? "Debug" : "Release";
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");
} else {
conf.Name += "|" + project->values("CE_SDK").join(' ') + " (" + project->first("CE_ARCH") + ")";