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-11 11:19:01 +0000
commit05b3295a570bd4f605dd3959f8abd4df1c7f7261 (patch)
tree990bb61310e8081636dd103066d6c46e673be3f7 /qmake
parent850c5dbcd3e56589a2825a7a156a14a0ccdd220d (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>
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 2845888dde..5bd2bcd4f6 100644
--- a/qmake/generators/makefile.cpp
+++ b/qmake/generators/makefile.cpp
@@ -3310,19 +3310,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