summaryrefslogtreecommitdiffstats
path: root/qmake
diff options
context:
space:
mode:
authorGiotis Nikos <giotis.nikos@gmail.com>2012-02-06 23:32:44 (GMT)
committerQt by Nokia <qt-info@nokia.com>2012-02-09 15:26:16 (GMT)
commit679def06d8cddbf4869ddc400546c4f5b2fbc61f (patch)
tree6c1ce595b47d7b5d260ac2862bbdde38a5534f18 /qmake
parentb0601630dd0ddabfaa3b97d042ee02b981d95988 (diff)
downloadQt-679def06d8cddbf4869ddc400546c4f5b2fbc61f.zip
Qt-679def06d8cddbf4869ddc400546c4f5b2fbc61f.tar.gz
Qt-679def06d8cddbf4869ddc400546c4f5b2fbc61f.tar.bz2
Fix qmake evaluation of QMAKE_TARGET.arch on msvc2010 x86_64
This change is needed because msvc2010 tools have a '\' character at the end of environment variable VCINSTALLDIR. This variable on msvc2008 does not have this '\' character at its end. Without this change QMAKE_TARGET.arch on msvc2010 x64 evaluates to x86 instead of x86_64. cherry picked from qtbase 66f56024ccfc39f818e0f16b44d4916b6a03d322 Task-number: QTBUG-22686 Change-Id: Ibc7546c522506b2c4e7a729a8de319aea788b662 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Diffstat (limited to 'qmake')
-rw-r--r--qmake/project.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/qmake/project.cpp b/qmake/project.cpp
index 732db53..a27b2f1 100644
--- a/qmake/project.cpp
+++ b/qmake/project.cpp
@@ -3147,8 +3147,14 @@ QStringList &QMakeProject::values(const QString &_var, QMap<QString, QStringList
QString ret, type = var.mid(13);
if(type == "arch") {
QString paths = qgetenv("PATH");
- QString vcBin64 = qgetenv("VCINSTALLDIR").append("\\bin\\amd64");
- QString vcBinX86_64 = qgetenv("VCINSTALLDIR").append("\\bin\\x86_amd64");
+ QString vcBin64 = qgetenv("VCINSTALLDIR");
+ if (!vcBin64.endsWith('\\'))
+ vcBin64.append('\\');
+ vcBin64.append("bin\\amd64");
+ QString vcBinX86_64 = qgetenv("VCINSTALLDIR");
+ if (!vcBinX86_64.endsWith('\\'))
+ vcBinX86_64.append('\\');
+ vcBinX86_64.append("bin\\x86_amd64");
if(paths.contains(vcBin64,Qt::CaseInsensitive) || paths.contains(vcBinX86_64,Qt::CaseInsensitive))
ret = "x86_64";
else