From 6dcd944deeed28bdd001eea5289d04116c9d23f4 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 16 May 2017 17:28:22 +0200 Subject: make mkspecs not mess up library and include search paths adding shared install paths to QMAKE_{INCDIR,LIBDIR} in the spec has the tiny side effect that they are searched _first_, which is generally a really bad idea - they should be _last_. for that purpose, make QMAKE_{INCDIR,LIBDIR}_POST live up to their names (i.e., search them actually last) and migrate all affected specs to use them. Task-number: QTBUG-40825 Change-Id: Ie0de81c3cc49e193186d2fedd7d6c77590c8ef79 Reviewed-by: Joerg Bornemann --- qmake/generators/unix/unixmake.cpp | 2 ++ qmake/generators/win32/winmakefile.cpp | 3 +++ 2 files changed, 5 insertions(+) (limited to 'qmake/generators') diff --git a/qmake/generators/unix/unixmake.cpp b/qmake/generators/unix/unixmake.cpp index b86594d191..2f1bbeea25 100644 --- a/qmake/generators/unix/unixmake.cpp +++ b/qmake/generators/unix/unixmake.cpp @@ -94,6 +94,8 @@ UnixMakefileGenerator::init() !project->values("QMAKE_LIB_FLAG").isEmpty() && project->isActiveConfig("dll")) project->values("QMAKE_LFLAGS") += project->values("QMAKE_LFLAGS_PREBIND"); + project->values("QMAKE_INCDIR") += project->values("QMAKE_INCDIR_POST"); + project->values("QMAKE_LIBDIR") += project->values("QMAKE_LIBDIR_POST"); if(!project->isEmpty("QMAKE_INCDIR")) project->values("INCLUDEPATH") += project->values("QMAKE_INCDIR"); ProStringList ldadd; diff --git a/qmake/generators/win32/winmakefile.cpp b/qmake/generators/win32/winmakefile.cpp index 6f2f43c03c..75bb5d236d 100644 --- a/qmake/generators/win32/winmakefile.cpp +++ b/qmake/generators/win32/winmakefile.cpp @@ -174,6 +174,9 @@ void Win32MakefileGenerator::processVars() else if (project->first("TEMPLATE").startsWith("vc")) project->values("MAKEFILE") = project->values("QMAKE_PROJECT_NAME"); + project->values("QMAKE_INCDIR") += project->values("QMAKE_INCDIR_POST"); + project->values("QMAKE_LIBDIR") += project->values("QMAKE_LIBDIR_POST"); + if (!project->values("QMAKE_INCDIR").isEmpty()) project->values("INCLUDEPATH") += project->values("QMAKE_INCDIR"); -- cgit v1.2.3