From 89886a34d7c4fdacc472f6e1498bc0769f2302ad Mon Sep 17 00:00:00 2001 From: Mark Brand Date: Mon, 10 Jan 2011 16:41:54 +0100 Subject: qmake: fix double directory separator Merge-request: 2543 Reviewed-by: Oswald Buddenhagen --- qmake/generators/unix/unixmake2.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/qmake/generators/unix/unixmake2.cpp b/qmake/generators/unix/unixmake2.cpp index 7c68316..009d4b5 100644 --- a/qmake/generators/unix/unixmake2.cpp +++ b/qmake/generators/unix/unixmake2.cpp @@ -1353,8 +1353,13 @@ UnixMakefileGenerator::pkgConfigFileName(bool fixify) if(dot != -1) ret = ret.left(dot); ret += Option::pkgcfg_ext; - if(!project->isEmpty("QMAKE_PKGCONFIG_DESTDIR")) - ret.prepend(project->first("QMAKE_PKGCONFIG_DESTDIR") + Option::dir_sep); + QString subdir = project->first("QMAKE_PKGCONFIG_DESTDIR"); + if(!subdir.isEmpty()) { + // initOutPaths() appends dir_sep, but just to be safe.. + if (!subdir.endsWith(Option::dir_sep)) + ret.prepend(Option::dir_sep); + ret.prepend(subdir); + } if(fixify) { if(QDir::isRelativePath(ret) && !project->isEmpty("DESTDIR")) ret.prepend(project->first("DESTDIR")); -- cgit v0.12