don't add bogus /mkspecs to QMAKE_MKSPECS
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>
Fri, 2 Mar 2012 16:27:33 +0000 (17:27 +0100)
committerQt by Nokia <qt-info@nokia.com>
Tue, 6 Mar 2012 20:50:25 +0000 (21:50 +0100)
the project build root can of course be empty - if there is neither an
mkspecs/ nor a .qmake.cache - or no project in the first place (-query).

Change-Id: I9595b0b4ad80a9086dcd48c9ae62b3e8bd1b6f2f
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
qmake/option.cpp

index ef613b9..b2a1e69 100644 (file)
@@ -594,7 +594,8 @@ QStringList Option::mkspecPaths()
         for (QStringList::ConstIterator it = lst.begin(); it != lst.end(); ++it)
             ret << ((*it) + concat);
     }
-    ret << Option::mkfile::project_build_root + concat;
+    if (!Option::mkfile::project_build_root.isEmpty())
+        ret << Option::mkfile::project_build_root + concat;
     if (!Option::mkfile::project_root.isEmpty())
         ret << Option::mkfile::project_root + concat;
     ret << QLibraryInfo::location(QLibraryInfo::HostDataPath) + concat;