diff options
author | Andreas Holzammer <andreas.holzammer@kdab.com> | 2012-05-02 09:42:20 (GMT) |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-05-25 14:02:13 (GMT) |
commit | a3d7244e99d230f4d3bc43c721257eef1ed333de (patch) | |
tree | 586d25d394696d4152a353025249a0657a9bffa3 /tools/configure | |
parent | a3a7553dd52a90a95cfeef80d36b1fd671b335b2 (diff) | |
download | Qt-a3d7244e99d230f4d3bc43c721257eef1ed333de.zip Qt-a3d7244e99d230f4d3bc43c721257eef1ed333de.tar.gz Qt-a3d7244e99d230f4d3bc43c721257eef1ed333de.tar.bz2 |
Support mkspecs in subdirs for xcompile under windows
Support mkspecs in subdirectories for cross compilation
under windows. Mkspecs in subdirectories are separated by
slashes.
backport from qt5 a3a1fea094434e29c362caba711c7d9883461792
Change-Id: Id3954cc38df2922b20156589335faad989ec0537
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Diffstat (limited to 'tools/configure')
-rw-r--r-- | tools/configure/configureapp.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index 0b4fbd8..bc594df 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> @@ -427,7 +428,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 @@ -1246,8 +1246,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)) { |