diff options
author | Rafael Roquetto <rafael.roquetto.qnx@kdab.com> | 2015-03-10 10:25:57 -0300 |
---|---|---|
committer | Rafael Roquetto <rafael.roquetto@kdab.com> | 2015-03-26 21:15:22 +0000 |
commit | f9da2c2c365f437fbf66763232dc24ea272986a7 (patch) | |
tree | f85e10f7210fe10a77ff5256c9fc0aad51662926 /tools/configure | |
parent | 6a15f68574bc7396d8939e34ed13bf96c18ff486 (diff) |
configure: take XQMAKESPEC into account when looking for files.
When cross-compiling, locateFile() needs to look into the XQMAKESPEC
directories instead. Otherwise, this will cause checkAvailability()/findFile()
to report wrong results.
Change-Id: Ia1b566b70cff039d8fd540bde3c7b4707338348a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Diffstat (limited to 'tools/configure')
-rw-r--r-- | tools/configure/configureapp.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index 88930cd6c7..04909525d1 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -2037,16 +2037,18 @@ bool Configure::displayHelp() // Locate a file and return its containing directory. QString Configure::locateFile(const QString &fileName) const { + const QString mkspec = dictionary.contains(QStringLiteral("XQMAKESPEC")) + ? dictionary[QStringLiteral("XQMAKESPEC")] : dictionary[QStringLiteral("QMAKESPEC")]; const QString file = fileName.toLower(); QStringList pathList; if (file.endsWith(".h")) { static const QStringList headerPaths = - Environment::headerPaths(Environment::compilerFromQMakeSpec(dictionary[QStringLiteral("QMAKESPEC")])); + Environment::headerPaths(Environment::compilerFromQMakeSpec(mkspec)); pathList = qmakeIncludes; pathList += headerPaths; } else if (file.endsWith(".lib") || file.endsWith(".a")) { static const QStringList libPaths = - Environment::libraryPaths(Environment::compilerFromQMakeSpec(dictionary[QStringLiteral("QMAKESPEC")])); + Environment::libraryPaths(Environment::compilerFromQMakeSpec(mkspec)); pathList = libPaths; } else { // Fallback for .exe and .dll (latter are not covered by QStandardPaths). |