diff options
author | Oswald Buddenhagen <oswald.buddenhagen@digia.com> | 2013-07-18 11:57:21 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-07-22 19:52:06 +0200 |
commit | cc0c394682470eac534822578cb432620a8779a8 (patch) | |
tree | e2ee9b55af9e8230e2ac42e79a54b5b61fa90f30 /qmake/generators | |
parent | f216caa52cac04bd4ed560ae2b5249a45e75070a (diff) |
escape paths coming from prl files
qmake has the rather bizarre logic that QMAKE_LIBS* is escaped rather
early (instead of right before being written out the the Makefile).
consequently, we need to explicitly escape the paths from the prl files
as well.
Task-number: QTBUG-32326
Change-Id: Ieaf81113d3ca3cf5d8a1ef87c83c5721d6b473ee
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Diffstat (limited to 'qmake/generators')
-rw-r--r-- | qmake/generators/unix/unixmake.cpp | 2 | ||||
-rw-r--r-- | qmake/generators/win32/winmakefile.cpp | 10 |
2 files changed, 9 insertions, 3 deletions
diff --git a/qmake/generators/unix/unixmake.cpp b/qmake/generators/unix/unixmake.cpp index 948fd2b79c..bbaecbfd72 100644 --- a/qmake/generators/unix/unixmake.cpp +++ b/qmake/generators/unix/unixmake.cpp @@ -641,7 +641,7 @@ UnixMakefileGenerator::processPrlFiles() ProStringList &prl_libs = project->values("QMAKE_CURRENT_PRL_LIBS"); if(!prl_libs.isEmpty()) { for(int prl = 0; prl < prl_libs.size(); ++prl) - l.insert(lit+prl+1, prl_libs.at(prl)); + l.insert(lit+prl+1, escapeFilePath(prl_libs.at(prl).toQString())); prl_libs.clear(); } } diff --git a/qmake/generators/win32/winmakefile.cpp b/qmake/generators/win32/winmakefile.cpp index e48ef9bacd..2ef2d82b5a 100644 --- a/qmake/generators/win32/winmakefile.cpp +++ b/qmake/generators/win32/winmakefile.cpp @@ -241,8 +241,14 @@ Win32MakefileGenerator::processPrlFiles() } } ProStringList &prl_libs = project->values("QMAKE_CURRENT_PRL_LIBS"); - for (int prl = 0; prl < prl_libs.size(); ++prl) - l.insert(lit + prl + 1, prl_libs.at(prl)); + for (int prl = 0; prl < prl_libs.size(); ++prl) { + ProString arg = prl_libs.at(prl); + if (arg.startsWith(libArg)) + arg = arg.left(libArg.length()) + escapeFilePath(arg.mid(libArg.length()).toQString()); + else if (!arg.startsWith('/')) + arg = escapeFilePath(arg.toQString()); + l.insert(lit + prl + 1, arg); + } prl_libs.clear(); } |