From a3d7244e99d230f4d3bc43c721257eef1ed333de Mon Sep 17 00:00:00 2001 From: Andreas Holzammer Date: Wed, 2 May 2012 11:42:20 +0200 Subject: 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 Reviewed-by: Andreas Holzammer --- tools/configure/configureapp.cpp | 14 +++++++++++--- 1 file 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 #include +#include #include #include #include @@ -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)) { -- cgit v0.12