use relative paths for build dir references
apart from being more readable, it has the side effect of being resistant to spaces in the build path. Change-Id: Id12603c3a96765913e747fba4070d49de0705315 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
This commit is contained in:
parent
217f21c479
commit
7e71eec3c8
2
configure
vendored
2
configure
vendored
@ -3964,7 +3964,7 @@ if true; then ###[ '!' -f "$outpath/bin/qmake" ];
|
||||
adjoutpath=`echo "$outpath" | sed 's/ /\\\\\\\\ /g'`
|
||||
adjqmakespec=`echo "$QMAKESPEC" | sed 's/ /\\\\\\\\ /g'`
|
||||
|
||||
echo "BUILD_PATH = $adjoutpath" >> "$mkfile"
|
||||
echo "BUILD_PATH = .." >> "$mkfile"
|
||||
echo "SOURCE_PATH = $adjrelpath" >> "$mkfile"
|
||||
if [ -e "$relpath/.git" ]; then
|
||||
echo 'INC_PATH = $(BUILD_PATH)/include' >> "$mkfile"
|
||||
|
@ -3160,7 +3160,7 @@ void Configure::detectArch()
|
||||
|
||||
// run qmake
|
||||
QString command = QString("%1 -spec %2 %3")
|
||||
.arg(QDir::toNativeSeparators(buildPath + "/bin/qmake.exe"),
|
||||
.arg(QDir::toNativeSeparators(QDir(newpwd).relativeFilePath(buildPath + "/bin/qmake.exe")),
|
||||
QDir::toNativeSeparators(qmakespec),
|
||||
QDir::toNativeSeparators(sourcePath + "/config.tests/arch/arch"
|
||||
+ (data.isHost ? "_host" : "") + ".pro"));
|
||||
@ -3268,7 +3268,7 @@ bool Configure::tryCompileProject(const QString &projectPath, const QString &ext
|
||||
|
||||
// run qmake
|
||||
QString command = QString("%1 %2 %3 2>&1")
|
||||
.arg(QDir::toNativeSeparators(buildPath + "/bin/qmake.exe"),
|
||||
.arg(QDir::toNativeSeparators(QDir(newpwd).relativeFilePath(buildPath + "/bin/qmake.exe")),
|
||||
QDir::toNativeSeparators(sourcePath + "/config.tests/" + projectPath),
|
||||
extraOptions);
|
||||
|
||||
@ -4133,10 +4133,10 @@ void Configure::buildQmake()
|
||||
if (out.open(QFile::WriteOnly | QFile::Text)) {
|
||||
QTextStream stream(&out);
|
||||
stream << "#AutoGenerated by configure.exe" << endl
|
||||
<< "BUILD_PATH = " << QDir::toNativeSeparators(buildPath) << endl
|
||||
<< "BUILD_PATH = .." << endl
|
||||
<< "SOURCE_PATH = " << QDir::toNativeSeparators(sourcePath) << endl
|
||||
<< "INC_PATH = " << QDir::toNativeSeparators(
|
||||
(QFile::exists(sourcePath + "/.git") ? buildPath : sourcePath)
|
||||
(QFile::exists(sourcePath + "/.git") ? ".." : sourcePath)
|
||||
+ "/include") << endl;
|
||||
stream << "QT_VERSION = " << dictionary["VERSION"] << endl;
|
||||
if (dictionary[ "QMAKESPEC" ] == QString("win32-g++")) {
|
||||
|
Loading…
Reference in New Issue
Block a user