summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>2012-07-12 09:38:44 +0200
committerQt by Nokia <qt-info@nokia.com>2012-07-12 10:40:50 +0200
commit079a87fec1baccf663d14aa8bb9eb3271efd7616 (patch)
treeed2827c96a4e088164a5969f5210b296ab6e3ee2
parentf45c62023d86609f8ce65ecda01f2e26bba12ee5 (diff)
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>
-rw-r--r--mkspecs/common/unix.conf3
-rw-r--r--mkspecs/features/qt_functions.prf6
-rw-r--r--qmake/generators/unix/unixmake.cpp2
3 files changed, 7 insertions, 4 deletions
diff --git a/mkspecs/common/unix.conf b/mkspecs/common/unix.conf
index 9ee626562b..5bbc25bb1d 100644
--- a/mkspecs/common/unix.conf
+++ b/mkspecs/common/unix.conf
@@ -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)
diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf
index 1868c68a69..649bea0f80 100644
--- a/mkspecs/features/qt_functions.prf
+++ b/mkspecs/features/qt_functions.prf
@@ -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'
diff --git a/qmake/generators/unix/unixmake.cpp b/qmake/generators/unix/unixmake.cpp
index 31b059decc..23168cc380 100644
--- a/qmake/generators/unix/unixmake.cpp
+++ b/qmake/generators/unix/unixmake.cpp
@@ -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++) {