summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorAndreas Holzammer <andreas.holzammer@kdab.com>2012-05-02 11:42:20 +0200
committerQt by Nokia <qt-info@nokia.com>2012-05-02 12:16:39 +0200
commita3a1fea094434e29c362caba711c7d9883461792 (patch)
tree2ddc7af628949f1dfae352e671fa15ca34a3d5d7 /tools
parent61196fc248e2b6e50f7de4f8863f8350d9b2bbb4 (diff)
Support mkspecs in subdirs for xcompile under windows
Support mkspecs in subdirectories for cross compilation under windows. Mkspecs in subdirectories are separated by slashes. Change-Id: Id3954cc38df2922b20156589335faad989ec0537 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/configure/configureapp.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp
index 1d202c0e44..d3084e19a7 100644
--- a/tools/configure/configureapp.cpp
+++ b/tools/configure/configureapp.cpp
@@ -47,6 +47,7 @@
#include <QDate>
#include <qdir.h>
+#include <qdiriterator.h>
#include <qtemporaryfile.h>
#include <qstack.h>
#include <qdebug.h>
@@ -355,7 +356,6 @@ QString Configure::firstLicensePath()
return QString();
}
-
// #### somehow I get a compiler error about vc++ reaching the nesting limit without
// undefining the ansi for scoping.
#ifdef for
@@ -1083,8 +1083,16 @@ void Configure::parseCmdLine()
}
// Ensure that QMAKESPEC exists in the mkspecs folder
- QDir mkspec_dir = fixSeparators(sourcePath + "/mkspecs");
- QStringList mkspecs = mkspec_dir.entryList(QDir::AllDirs | QDir::NoDotAndDotDot);
+ const QString mkspecPath = fixSeparators(sourcePath + "/mkspecs");
+ QDirIterator itMkspecs(mkspecPath, QDir::AllDirs | QDir::NoDotAndDotDot, QDirIterator::Subdirectories);
+ QStringList mkspecs;
+
+ while (itMkspecs.hasNext()) {
+ QString mkspec = itMkspecs.next();
+ // Remove base PATH
+ mkspec.remove(0, mkspecPath.length() + 1);
+ mkspecs << mkspec;
+ }
if (dictionary["QMAKESPEC"].toLower() == "features"
|| !mkspecs.contains(dictionary["QMAKESPEC"], Qt::CaseInsensitive)) {