summaryrefslogtreecommitdiffstats
path: root/qmake
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>2015-09-18 21:02:37 +0200
committerOswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>2015-10-02 14:01:03 +0000
commit3e01f1ad3b19880628cf26e5395d34a1a9f2af05 (patch)
tree643c1785213e46f6a6e2ae1b73c32331b0342a2e /qmake
parent3e73e3552c8644ace6ac86a8f72e9f1217611979 (diff)
make processPrlFile() munge the path less when replacing the target
don't prepend the normalized path to the target name, but replace only the filename in the original string. this ensures that any variables in the path are preserved. Change-Id: I58c2b54b7114bfdbf659e6a6ce3e02c2611900d4 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Diffstat (limited to 'qmake')
-rw-r--r--qmake/generators/makefile.cpp17
1 files changed, 8 insertions, 9 deletions
diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp
index e329fe2898..b4190311ed 100644
--- a/qmake/generators/makefile.cpp
+++ b/qmake/generators/makefile.cpp
@@ -877,7 +877,6 @@ MakefileGenerator::processPrlFile(QString &file)
if(QMakeMetaInfo::libExists(file)) {
try_replace_file = true;
meta_file = file;
- file = "";
} else {
QString tmp = file;
int ext = tmp.lastIndexOf('.');
@@ -904,14 +903,14 @@ MakefileGenerator::processPrlFile(QString &file)
foreach (const ProString &def, libinfo.values("QMAKE_PRL_DEFINES"))
if (!defs.contains(def) && prl_defs.contains(def))
defs.append(def);
- if(try_replace_file && !libinfo.isEmpty("QMAKE_PRL_TARGET")) {
- QString dir;
- int slsh = real_meta_file.lastIndexOf('/');
- if(slsh != -1)
- dir = real_meta_file.left(slsh+1);
- file = libinfo.first("QMAKE_PRL_TARGET").toQString();
- if(QDir::isRelativePath(file))
- file.prepend(dir);
+ if (try_replace_file) {
+ ProString tgt = libinfo.first("QMAKE_PRL_TARGET");
+ if (!tgt.isEmpty()) {
+ int off = qMax(file.lastIndexOf('/'), file.lastIndexOf('\\')) + 1;
+ debug_msg(1, " Replacing library reference %s with %s",
+ file.mid(off).toLatin1().constData(), tgt.toQString().toLatin1().constData());
+ file.replace(off, 1000, tgt.toQString());
+ }
}
}
}