summaryrefslogtreecommitdiffstats
path: root/qmake/generators/makefile.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qmake/generators/makefile.cpp')
-rw-r--r--qmake/generators/makefile.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp
index 9ab9a9adea..a75149b926 100644
--- a/qmake/generators/makefile.cpp
+++ b/qmake/generators/makefile.cpp
@@ -3161,11 +3161,8 @@ MakefileGenerator::pkgConfigFixPath(QString path) const
void
MakefileGenerator::writePkgConfigFile()
{
- QString fname = pkgConfigFileName(), lname = fname;
+ QString fname = pkgConfigFileName();
mkdir(fileInfo(fname).path());
- int slsh = lname.lastIndexOf(Option::dir_sep);
- if(slsh != -1)
- lname = lname.right(lname.length() - slsh - 1);
QFile ft(fname);
if(!ft.open(QIODevice::WriteOnly))
return;
@@ -3252,7 +3249,7 @@ MakefileGenerator::writePkgConfigFile()
pkgConfiglibName = "-framework " + bundle + " ";
} else {
pkgConfiglibDir = "-L${libdir}";
- pkgConfiglibName = "-l" + lname.left(lname.length()-Option::libtool_ext.length());
+ pkgConfiglibName = "-l" + fileInfo(fname).completeBaseName();
if (project->isActiveConfig("shared"))
pkgConfiglibName += project->first("TARGET_VERSION_EXT").toQString();
}