fix static library names when generating .pc files for pkgconfig
authorMark Brand <mabrand@mabrand.nl>
Thu, 19 Apr 2012 12:48:34 +0000 (14:48 +0200)
committerQt by Nokia <qt-info@nokia.com>
Thu, 19 Apr 2012 17:46:07 +0000 (19:46 +0200)
219a688ac17052e4bb3aac9ff8a813e3f4d8da01 added the version extension
which only occurs on the DLL import library.

Change-Id: Ie913adf039d7f3a9aadf43f4af014289a8aeacbe
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Hib Eris <hib@hiberis.nl>
qmake/generators/makefile.cpp

index 1904b8f..d37089e 100644 (file)
@@ -3251,7 +3251,8 @@ MakefileGenerator::writePkgConfigFile()
     } else {
         pkgConfiglibDir = "-L${libdir}";
         pkgConfiglibName = "-l" + lname.left(lname.length()-Option::libtool_ext.length());
-        pkgConfiglibName += project->first("TARGET_VERSION_EXT");
+        if (project->isActiveConfig("shared"))
+            pkgConfiglibName += project->first("TARGET_VERSION_EXT");
     }
     t << pkgConfiglibDir << " " << pkgConfiglibName << " " << endl;