summaryrefslogtreecommitdiffstats
path: root/qmake/generators/win32/mingw_make.cpp
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2008-10-20 07:59:51 (GMT)
committerThiago Macieira <thiago.macieira@nokia.com>2009-08-17 10:48:24 (GMT)
commit5bc8c27e9406fd55693e3a3963030c6d9a89b08a (patch)
tree94beac30107d3b09550094a0e00e6c26b01eb5d1 /qmake/generators/win32/mingw_make.cpp
parent8096d2bbbb1f4becaaefe2219560f8dd558235de (diff)
downloadQt-5bc8c27e9406fd55693e3a3963030c6d9a89b08a.zip
Qt-5bc8c27e9406fd55693e3a3963030c6d9a89b08a.tar.gz
Qt-5bc8c27e9406fd55693e3a3963030c6d9a89b08a.tar.bz2
Add LIBS_PRIVATE to qmake.
The difference between LIBS and LIBS_PRIVATE is that private libraries are those that are not part of the public interface of a library. For example, if you're writing a Qt application and link to QtGui, you definitely need the development files for QtCore, but not necessarily for Glib and GThread, or maybe even X11. The private libraries are necessary only in static builds, so the information should still be published in .prl and pkg-config files. Reviewed-By: Marius Storm-Olsen
Diffstat (limited to 'qmake/generators/win32/mingw_make.cpp')
-rw-r--r--qmake/generators/win32/mingw_make.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/qmake/generators/win32/mingw_make.cpp b/qmake/generators/win32/mingw_make.cpp
index 84104fd..fb0f48d 100644
--- a/qmake/generators/win32/mingw_make.cpp
+++ b/qmake/generators/win32/mingw_make.cpp
@@ -82,7 +82,12 @@ QString MingwMakefileGenerator::getLibTarget()
bool MingwMakefileGenerator::findLibraries()
{
- QStringList &l = project->values("QMAKE_LIBS");
+ return findLibraries("QMAKE_LIBS") && findLibraries("QMAKE_LIBS_PRIVATE");
+}
+
+bool MingwMakefileGenerator::findLibraries(const QString &where)
+{
+ QStringList &l = project->values(where);
QList<QMakeLocalFileName> dirs;
{
@@ -258,6 +263,7 @@ void MingwMakefileGenerator::init()
// LIBS defined in Profile comes first for gcc
project->values("QMAKE_LIBS") += escapeFilePaths(project->values("LIBS"));
+ project->values("QMAKE_LIBS_PRIVATE") += escapeFilePaths(project->values("LIBS_PRIVATE"));
QString targetfilename = project->values("TARGET").first();
QStringList &configs = project->values("CONFIG");
@@ -344,7 +350,8 @@ void MingwMakefileGenerator::writeLibsPart(QTextStream &t)
t << "LIBS = ";
if(!project->values("QMAKE_LIBDIR").isEmpty())
writeLibDirPart(t);
- t << var("QMAKE_LIBS").replace(QRegExp("(\\slib|^lib)")," -l") << endl;
+ t << var("QMAKE_LIBS").replace(QRegExp("(\\slib|^lib)")," -l") << ' '
+ << var("QMAKE_LIBS_PRIVATE").replace(QRegExp("(\\slib|^lib)")," -l") << endl;
}
}