summaryrefslogtreecommitdiffstats
path: root/qmake
diff options
context:
space:
mode:
Diffstat (limited to 'qmake')
-rw-r--r--qmake/Makefile.unix8
-rw-r--r--qmake/Makefile.win328
-rw-r--r--qmake/Makefile.win32-g++6
-rw-r--r--qmake/Makefile.win32-g++-sh6
-rw-r--r--qmake/generators/makefile.cpp2
-rw-r--r--qmake/generators/unix/unixmake.cpp5
-rw-r--r--qmake/generators/unix/unixmake2.cpp18
-rw-r--r--qmake/generators/win32/mingw_make.cpp11
-rw-r--r--qmake/generators/win32/mingw_make.h1
-rw-r--r--qmake/generators/win32/msvc_nmake.cpp1
-rw-r--r--qmake/generators/win32/winmakefile.cpp2
-rw-r--r--qmake/generators/win32/winmakefile.h2
-rw-r--r--qmake/qmake.pri2
13 files changed, 43 insertions, 29 deletions
diff --git a/qmake/Makefile.unix b/qmake/Makefile.unix
index 6ba5b6b..7ab61f0 100644
--- a/qmake/Makefile.unix
+++ b/qmake/Makefile.unix
@@ -14,7 +14,7 @@ OBJS=project.o property.o main.o makefile.o unixmake2.o unixmake.o \
#qt code
QOBJS=qtextcodec.o qutfcodec.o qstring.o qtextstream.o qiodevice.o qmalloc.o qglobal.o \
- qbytearray.o qbytearraymatcher.o qdatastream.o qbuffer.o qlistdata.o qfile.o \
+ qbytearray.o qbytearraymatcher.o qdatastream.o qbuffer.o qlist.o qfile.o \
qfsfileengine_unix.o qfsfileengine_iterator_unix.o qfsfileengine.o \
qfsfileengine_iterator.o qregexp.o qvector.o qbitarray.o qdir.o qdiriterator.o quuid.o qhash.o \
qfileinfo.o qdatetime.o qstringlist.o qabstractfileengine.o qtemporaryfile.o \
@@ -56,7 +56,7 @@ DEPEND_SRC=project.cpp property.cpp meta.cpp main.cpp generators/makefile.cpp ge
$(SOURCE_PATH)/src/corelib/io/qdatastream.cpp $(SOURCE_PATH)/src/corelib/io/qbuffer.cpp \
$(SOURCE_PATH)/src/corelib/io/qfsfileengine_unix.cpp $(SOURCE_PATH)/src/corelib/io/qabstractfileengine.cpp \
$(SOURCE_PATH)/src/corelib/io/qfsfileengine_iterator_unix.cpp $(SOURCE_PATH)/src/corelib/io/qfsfileengine_iterator.cpp \
- $(SOURCE_PATH)/src/corelib/io/qfsfileengine.cpp $(SOURCE_PATH)/src/corelib/tools/qlistdata.cpp \
+ $(SOURCE_PATH)/src/corelib/io/qfsfileengine.cpp $(SOURCE_PATH)/src/corelib/tools/qlist.cpp \
$(SOURCE_PATH)/src/corelib/tools/qvector.cpp $(SOURCE_PATH)/src/corelib/tools/qbitarray.cpp \
$(SOURCE_PATH)/src/corelib/io/qdiriterator.cpp \
$(SOURCE_PATH)/src/corelib/io/qdir.cpp $(SOURCE_PATH)/src/corelib/plugin/quuid.cpp \
@@ -184,8 +184,8 @@ qdatastream.o: $(SOURCE_PATH)/src/corelib/io/qdatastream.cpp
qbuffer.o: $(SOURCE_PATH)/src/corelib/io/qbuffer.cpp
$(CXX) -c -o $@ $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/io/qbuffer.cpp
-qlistdata.o: $(SOURCE_PATH)/src/corelib/tools/qlistdata.cpp
- $(CXX) -c -o $@ $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/tools/qlistdata.cpp
+qlist.o: $(SOURCE_PATH)/src/corelib/tools/qlist.cpp
+ $(CXX) -c -o $@ $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/tools/qlist.cpp
qfile.o: $(SOURCE_PATH)/src/corelib/io/qfile.cpp
$(CXX) -c -o $@ $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/io/qfile.cpp
diff --git a/qmake/Makefile.win32 b/qmake/Makefile.win32
index 929f950..edb4503 100644
--- a/qmake/Makefile.win32
+++ b/qmake/Makefile.win32
@@ -104,7 +104,7 @@ QTOBJS= \
qglobal.obj \
qhash.obj \
qiodevice.obj \
- qlistdata.obj \
+ qlist.obj \
qlinkedlist.obj \
qlocale.obj \
qmalloc.obj \
@@ -195,7 +195,7 @@ clean::
-del qglobal.obj
-del qhash.obj
-del qiodevice.obj
- -del qlistdata.obj
+ -del qlist.obj
-del qlocale.obj
-del qmalloc.obj
-del qmap.obj
@@ -369,8 +369,8 @@ quuid.obj: $(SOURCE_PATH)\src\corelib\plugin\quuid.cpp
qbuffer.obj: $(SOURCE_PATH)\src\corelib\io\qbuffer.cpp
$(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\io\qbuffer.cpp
-qlistdata.obj: $(SOURCE_PATH)\src\corelib\tools\qlistdata.cpp
- $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\tools\qlistdata.cpp
+qlist.obj: $(SOURCE_PATH)\src\corelib\tools\qlist.cpp
+ $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\tools\qlist.cpp
qlinkedlist.obj: $(SOURCE_PATH)\src\corelib\tools\qlinkedlist.cpp
$(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\tools\qlinkedlist.cpp
diff --git a/qmake/Makefile.win32-g++ b/qmake/Makefile.win32-g++
index c18201e..de25dae 100644
--- a/qmake/Makefile.win32-g++
+++ b/qmake/Makefile.win32-g++
@@ -69,7 +69,7 @@ QTOBJS= \
qhash.o \
qiodevice.o \
qlibraryinfo.o \
- qlistdata.o \
+ qlist.o \
qlinkedlist.o \
qlocale.o \
qmalloc.o \
@@ -215,8 +215,8 @@ quuid.o: $(SOURCE_PATH)/src/corelib/plugin/quuid.cpp
qbuffer.o: $(SOURCE_PATH)/src/corelib/io/qbuffer.cpp
$(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/io/qbuffer.cpp
-qlistdata.o: $(SOURCE_PATH)/src/corelib/tools/qlistdata.cpp
- $(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/tools/qlistdata.cpp
+qlist.o: $(SOURCE_PATH)/src/corelib/tools/qlist.cpp
+ $(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/tools/qlist.cpp
qlinkedlist.o: $(SOURCE_PATH)/src/corelib/tools/qlinkedlist.cpp
$(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/tools/qlinkedlist.cpp
diff --git a/qmake/Makefile.win32-g++-sh b/qmake/Makefile.win32-g++-sh
index e02a021..83a33c1 100644
--- a/qmake/Makefile.win32-g++-sh
+++ b/qmake/Makefile.win32-g++-sh
@@ -69,7 +69,7 @@ QTOBJS= \
qhash.o \
qiodevice.o \
qlibraryinfo.o \
- qlistdata.o \
+ qlist.o \
qlinkedlist.o \
qlocale.o \
qmalloc.o \
@@ -214,8 +214,8 @@ quuid.o: $(SOURCE_PATH)/src/corelib/plugin/quuid.cpp
qbuffer.o: $(SOURCE_PATH)/src/corelib/io/qbuffer.cpp
$(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/io/qbuffer.cpp
-qlistdata.o: $(SOURCE_PATH)/src/corelib/tools/qlistdata.cpp
- $(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/tools/qlistdata.cpp
+qlist.o: $(SOURCE_PATH)/src/corelib/tools/qlist.cpp
+ $(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/tools/qlist.cpp
qlinkedlist.o: $(SOURCE_PATH)/src/corelib/tools/qlinkedlist.cpp
$(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/tools/qlinkedlist.cpp
diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp
index a313728..7241678 100644
--- a/qmake/generators/makefile.cpp
+++ b/qmake/generators/makefile.cpp
@@ -969,6 +969,8 @@ MakefileGenerator::writePrlFile(QTextStream &t)
libs = project->values("QMAKE_INTERNAL_PRL_LIBS");
else
libs << "QMAKE_LIBS"; //obvious one
+ if(project->isActiveConfig("staticlib"))
+ libs << "QMAKE_LIBS_PRIVATE";
t << "QMAKE_PRL_LIBS = ";
for(QStringList::Iterator it = libs.begin(); it != libs.end(); ++it)
t << project->values((*it)).join(" ") << " ";
diff --git a/qmake/generators/unix/unixmake.cpp b/qmake/generators/unix/unixmake.cpp
index a2bd71f..626b955a5 100644
--- a/qmake/generators/unix/unixmake.cpp
+++ b/qmake/generators/unix/unixmake.cpp
@@ -127,6 +127,7 @@ UnixMakefileGenerator::init()
project->values("QMAKE_ORIG_TARGET") = project->values("TARGET");
project->values("QMAKE_ORIG_DESTDIR") = project->values("DESTDIR");
project->values("QMAKE_LIBS") += escapeFilePaths(project->values("LIBS"));
+ project->values("QMAKE_LIBS_PRIVATE") += escapeFilePaths(project->values("LIBS_PRIVATE"));
if((!project->isEmpty("QMAKE_LIB_FLAG") && !project->isActiveConfig("staticlib")) ||
(project->isActiveConfig("qt") && project->isActiveConfig("plugin"))) {
if(configs.indexOf("dll") == -1) configs.append("dll");
@@ -261,7 +262,7 @@ UnixMakefileGenerator::init()
bundle += project->first("QMAKE_BUNDLE_EXTENSION");
else if(!bundle.endsWith(".plugin"))
bundle += ".plugin";
- if(!project->isEmpty("QMAKE_BUNDLE_LOCATION"))
+ if(project->isEmpty("QMAKE_BUNDLE_LOCATION"))
project->values("QMAKE_BUNDLE_LOCATION").append("Contents/MacOS");
} else {
if(!project->isEmpty("QMAKE_FRAMEWORK_BUNDLE_NAME"))
@@ -441,7 +442,7 @@ UnixMakefileGenerator::findLibraries()
QList<QMakeLocalFileName> libdirs, frameworkdirs;
frameworkdirs.append(QMakeLocalFileName("/System/Library/Frameworks"));
frameworkdirs.append(QMakeLocalFileName("/Library/Frameworks"));
- const QString lflags[] = { "QMAKE_LIBDIR_FLAGS", "QMAKE_FRAMEWORKPATH_FLAGS", "QMAKE_LFLAGS", "QMAKE_LIBS", QString() };
+ const QString lflags[] = { "QMAKE_LIBDIR_FLAGS", "QMAKE_FRAMEWORKPATH_FLAGS", "QMAKE_LFLAGS", "QMAKE_LIBS", "QMAKE_LIBS_PRIVATE", QString() };
for(int i = 0; !lflags[i].isNull(); i++) {
QStringList &l = project->values(lflags[i]);
for(QStringList::Iterator it = l.begin(); it != l.end(); ++it) {
diff --git a/qmake/generators/unix/unixmake2.cpp b/qmake/generators/unix/unixmake2.cpp
index b8252b8..07c7d38 100644
--- a/qmake/generators/unix/unixmake2.cpp
+++ b/qmake/generators/unix/unixmake2.cpp
@@ -149,7 +149,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
t << "LINK = " << var("QMAKE_LINK") << endl;
t << "LFLAGS = " << var("QMAKE_LFLAGS") << endl;
t << "LIBS = " << "$(SUBLIBS) " << var("QMAKE_FRAMEWORKDIR_FLAGS") << " "
- << var("QMAKE_LIBDIR_FLAGS") << " " << var("QMAKE_LIBS") << endl;
+ << var("QMAKE_LIBDIR_FLAGS") << " " << var("QMAKE_LIBS") << " " << var("QMAKE_LIBS_PRIVATE") << endl;
}
t << "AR = " << var("QMAKE_AR") << endl;
@@ -1424,13 +1424,6 @@ UnixMakefileGenerator::writePkgConfigFile()
t << "Version: " << project->first("VERSION") << endl;
// libs
- QStringList libs;
- if(!project->isEmpty("QMAKE_INTERNAL_PRL_LIBS")) {
- libs = project->values("QMAKE_INTERNAL_PRL_LIBS");
- } else {
- libs << "QMAKE_LIBS"; //obvious one
- }
- libs << "QMAKE_LFLAGS_THREAD"; //not sure about this one, but what about things like -pthread?
t << "Libs: ";
QString pkgConfiglibDir;
QString pkgConfiglibName;
@@ -1450,6 +1443,15 @@ UnixMakefileGenerator::writePkgConfigFile()
pkgConfiglibName = "-l" + lname.left(lname.length()-Option::libtool_ext.length());
}
t << pkgConfiglibDir << " " << pkgConfiglibName << " " << endl;
+
+ QStringList 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(QStringList::ConstIterator it = libs.begin(); it != libs.end(); ++it) {
t << project->values((*it)).join(" ") << " ";
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;
}
}
diff --git a/qmake/generators/win32/mingw_make.h b/qmake/generators/win32/mingw_make.h
index c95beff..8640bbc 100644
--- a/qmake/generators/win32/mingw_make.h
+++ b/qmake/generators/win32/mingw_make.h
@@ -72,6 +72,7 @@ private:
QString preCompHeaderOut;
virtual bool findLibraries();
+ bool findLibraries(const QString &where);
void fixTargetExt();
bool init_flag;
diff --git a/qmake/generators/win32/msvc_nmake.cpp b/qmake/generators/win32/msvc_nmake.cpp
index 7613ef2..3a0ca6f 100644
--- a/qmake/generators/win32/msvc_nmake.cpp
+++ b/qmake/generators/win32/msvc_nmake.cpp
@@ -172,6 +172,7 @@ void NmakeMakefileGenerator::init()
}
project->values("QMAKE_LIBS") += escapeFilePaths(project->values("LIBS"));
+ project->values("QMAKE_LIBS_PRIVATE") += escapeFilePaths(project->values("LIBS_PRIVATE"));
processVars();
if (!project->values("RES_FILE").isEmpty()) {
diff --git a/qmake/generators/win32/winmakefile.cpp b/qmake/generators/win32/winmakefile.cpp
index e3923c6..3a4329c 100644
--- a/qmake/generators/win32/winmakefile.cpp
+++ b/qmake/generators/win32/winmakefile.cpp
@@ -708,7 +708,7 @@ void Win32MakefileGenerator::writeLibsPart(QTextStream &t)
if(!project->values("QMAKE_LIBDIR").isEmpty())
writeLibDirPart(t);
t << var("QMAKE_LFLAGS") << endl;
- t << "LIBS = " << var("QMAKE_LIBS") << endl;
+ t << "LIBS = " << var("QMAKE_LIBS") << " " << var("QMAKE_LIBS_PRIVATE") << endl;
}
}
diff --git a/qmake/generators/win32/winmakefile.h b/qmake/generators/win32/winmakefile.h
index e2b6608..7032251 100644
--- a/qmake/generators/win32/winmakefile.h
+++ b/qmake/generators/win32/winmakefile.h
@@ -89,7 +89,7 @@ inline Win32MakefileGenerator::~Win32MakefileGenerator()
{ }
inline bool Win32MakefileGenerator::findLibraries()
-{ return findLibraries("QMAKE_LIBS"); }
+{ return findLibraries("QMAKE_LIBS") && findLibraries("QMAKE_LIBS_PRIVATE"); }
QT_END_NAMESPACE
diff --git a/qmake/qmake.pri b/qmake/qmake.pri
index 986c513..e982a06 100644
--- a/qmake/qmake.pri
+++ b/qmake/qmake.pri
@@ -61,7 +61,7 @@ bootstrap { #Qt code
qnumeric.cpp \
qhash.cpp \
qiodevice.cpp \
- qlistdata.cpp \
+ qlist.cpp \
qlinkedlist.cpp \
qlocale.cpp \
qmalloc.cpp \