summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/configure/configureapp.cpp15
1 files changed, 13 insertions, 2 deletions
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp
index fbf0de4dce..73ef0dcf23 100644
--- a/tools/configure/configureapp.cpp
+++ b/tools/configure/configureapp.cpp
@@ -389,6 +389,11 @@ QString Configure::firstLicensePath()
void Configure::parseCmdLine()
{
+ if (configCmdLine.size() && configCmdLine.at(0) == "-top-level") {
+ dictionary[ "TOPLEVEL" ] = "yes";
+ configCmdLine.removeAt(0);
+ }
+
int argCount = configCmdLine.size();
int i = 0;
const QStringList imageFormats = QStringList() << "gif" << "png" << "jpeg";
@@ -3958,6 +3963,12 @@ void Configure::generateMakefiles()
QString pwd = QDir::currentPath();
{
+ QString sourcePathMangled = sourcePath;
+ QString buildPathMangled = buildPath;
+ if (dictionary.contains("TOPLEVEL")) {
+ sourcePathMangled = QFileInfo(sourcePath).path();
+ buildPathMangled = QFileInfo(buildPath).path();
+ }
bool generate = true;
bool doDsp = (dictionary["VCPROJFILES"] == "yes"
&& dictionary["PROCESS"] == "full");
@@ -3977,9 +3988,9 @@ void Configure::generateMakefiles()
}
if (dictionary[ "PROCESS" ] == "full")
args << "-r";
- args << sourcePath;
+ args << sourcePathMangled;
- QDir::setCurrent(buildPath);
+ QDir::setCurrent(buildPathMangled);
if (int exitCode = Environment::execute(args, QStringList(), QStringList())) {
cout << "Qmake failed, return code " << exitCode << endl << endl;
dictionary[ "DONE" ] = "error";