From 6accf40a147b97b8eda8b71268de013d72192359 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 14 Apr 2015 19:34:40 +0200 Subject: [PATCH] make fileFixify(FileFixifyAbsolute) pay attention to in_dir ... instead of sheepishly assuming qmake_pwd(). it also canonicalizes consistently with the relative output path now. Change-Id: I86231f7259179020643405f3c0e696a74031aa4e Reviewed-by: Joerg Bornemann --- qmake/generators/makefile.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp index ea8b43e219..7e118b127c 100644 --- a/qmake/generators/makefile.cpp +++ b/qmake/generators/makefile.cpp @@ -2839,7 +2839,12 @@ MakefileGenerator::fileFixify(const QString& file, const QString &out_d, const Q } if(fix == FileFixifyAbsolute || (fix == FileFixifyDefault && project->isActiveConfig("no_fixpath"))) { if(fix == FileFixifyAbsolute && QDir::isRelativePath(ret)) { //already absolute - QString pwd = qmake_getpwd(); + QString pwd = QDir(qmake_getpwd()).absoluteFilePath(in_d); + { + QFileInfo in_fi(fileInfo(pwd)); + if (in_fi.exists()) + pwd = in_fi.canonicalFilePath(); + } if (!pwd.endsWith(QLatin1Char('/'))) pwd += QLatin1Char('/'); ret.prepend(pwd);