diff options
author | Giotis Nikos <giotis.nikos@gmail.com> | 2012-02-07 01:32:44 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-02-09 16:26:16 +0100 |
commit | 679def06d8cddbf4869ddc400546c4f5b2fbc61f (patch) | |
tree | 6c1ce595b47d7b5d260ac2862bbdde38a5534f18 /qmake | |
parent | b0601630dd0ddabfaa3b97d042ee02b981d95988 (diff) | |
download | qt4-tools-679def06d8cddbf4869ddc400546c4f5b2fbc61f.tar.gz |
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.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/qmake/project.cpp b/qmake/project.cpp index 732db53f14..a27b2f1915 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 |