From cc0c394682470eac534822578cb432620a8779a8 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Thu, 18 Jul 2013 11:57:21 +0200 Subject: 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 --- qmake/generators/unix/unixmake.cpp | 2 +- qmake/generators/win32/winmakefile.cpp | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) (limited to 'qmake') 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(); } -- cgit v1.2.3