summaryrefslogtreecommitdiffstats
path: root/qmake
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@qt.io>2017-04-10 13:10:56 +0200
committerOswald Buddenhagen <oswald.buddenhagen@qt.io>2017-04-12 15:08:18 +0000
commit1936d0cf5bac6cd3bf62f3e8995cbfed98650155 (patch)
tree8c1579275cbb0f198241351db33a2df8e8a11d44 /qmake
parentd6c232535c760a64e6e998b1aeef2885b8bb1c96 (diff)
write Libs.private to .pc files only in static builds
projects using a dynamic build are not supposed to access this variable anyway. Task-number: QTBUG-51598 Change-Id: I81b55ea9ba460b80919f40ed7fe3d52129636b9e Reviewed-by: Michal Klocek <michal.klocek@qt.io> Reviewed-by: Jonathan Liu <net147@gmail.com> (cherry picked from commit 05b3295a570bd4f605dd3959f8abd4df1c7f7261) Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'qmake')
-rw-r--r--qmake/generators/makefile.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp
index d896d04e9d..39a8d3188a 100644
--- a/qmake/generators/makefile.cpp
+++ b/qmake/generators/makefile.cpp
@@ -3297,19 +3297,19 @@ MakefileGenerator::writePkgConfigFile()
}
t << shellQuote(pkgConfiglibName) << " \n";
- ProStringList libs;
- if(!project->isEmpty("QMAKE_INTERNAL_PRL_LIBS")) {
- libs = project->values("QMAKE_INTERNAL_PRL_LIBS");
- } else {
- libs << "QMAKE_LIBS"; //obvious one
- }
- libs << "QMAKE_LIBS_PRIVATE";
- libs << "QMAKE_LFLAGS_THREAD"; //not sure about this one, but what about things like -pthread?
- t << "Libs.private: ";
- for (ProStringList::ConstIterator it = libs.begin(); it != libs.end(); ++it) {
- t << fixLibFlags((*it).toKey()).join(' ') << ' ';
+ if (project->isActiveConfig("staticlib")) {
+ ProStringList libs;
+ if (!project->isEmpty("QMAKE_INTERNAL_PRL_LIBS"))
+ libs = project->values("QMAKE_INTERNAL_PRL_LIBS");
+ else
+ libs << "QMAKE_LIBS"; //obvious one
+ libs << "QMAKE_LIBS_PRIVATE";
+ libs << "QMAKE_LFLAGS_THREAD"; //not sure about this one, but what about things like -pthread?
+ t << "Libs.private:";
+ for (ProStringList::ConstIterator it = libs.begin(); it != libs.end(); ++it)
+ t << ' ' << fixLibFlags((*it).toKey()).join(' ');
+ t << endl;
}
- t << endl;
// flags
// ### too many