make the prl lookup search in standard locations

qtAddModule() skips adding standard library paths to LIBS. however, as
processPrlFiles() didn't know anything about that, it would not find the
prl files of qt libraries in these paths.
so centralize the definition of these default paths (we should actually
ask the linker for them) and use it in both places.
do the same for the include paths for symmetry.

Change-Id: I7e3692dc2d1c2d0c97a9151d15887b1263de137a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Oswald Buddenhagen 2012-07-12 09:38:44 +02:00 committed by Qt by Nokia
parent f45c62023d
commit 079a87fec1
3 changed files with 7 additions and 4 deletions

View File

@ -13,4 +13,7 @@ QMAKE_PREFIX_SHLIB = lib
QMAKE_PREFIX_STATICLIB = lib
QMAKE_EXTENSION_STATICLIB = a
QMAKE_DEFAULT_INCDIRS = /usr/include /usr/local/include
QMAKE_DEFAULT_LIBDIRS = /usr/lib /usr/local/lib
include(shell-unix.conf)

View File

@ -45,10 +45,8 @@ defineTest(qtAddModule) {
CONFIG += $$eval(QT.$${1}.CONFIG)
DEFINES += $$eval(QT.$${1}.DEFINES)
unix {
MODULE_INCLUDES -= /usr/include /usr/local/include
MODULE_LIBS -= /usr/lib /usr/local/lib
}
MODULE_INCLUDES -= $$QMAKE_DEFAULT_INCDIRS
MODULE_LIBS -= $$QMAKE_DEFAULT_LIBDIRS
INCLUDEPATH *= $$MODULE_INCLUDES
auto_use_privates|isEqual(2, UsePrivate) { # Tests function parameter 2 ($$2) being equal to 'UsePrivate'

View File

@ -578,6 +578,8 @@ void
UnixMakefileGenerator::processPrlFiles()
{
QList<QMakeLocalFileName> libdirs, frameworkdirs;
foreach (const QString &dlib, project->values("QMAKE_DEFAULT_LIBDIRS"))
libdirs.append(QMakeLocalFileName(dlib));
frameworkdirs.append(QMakeLocalFileName("/System/Library/Frameworks"));
const QString lflags[] = { "QMAKE_LIBDIR_FLAGS", "QMAKE_FRAMEWORKPATH_FLAGS", "QMAKE_LFLAGS", "QMAKE_LIBS", QString() };
for(int i = 0; !lflags[i].isNull(); i++) {