summaryrefslogtreecommitdiffstats
path: root/qmake
diff options
context:
space:
mode:
authorAdam Strzelecki <ono@java.pl>2014-08-07 13:06:55 +0200
committerOswald Buddenhagen <oswald.buddenhagen@digia.com>2014-08-09 15:37:32 +0200
commitdbb0d5469982c57b29a474e6a940cdecbaf948e2 (patch)
treec6e9954bcc4dac94a89211038fb05cdefc266108 /qmake
parent8f22f242a2fcaad5adb9ce627dd6e61a1bfe220c (diff)
qmake: Don't make rpaths starting with @ or $ absolute
Defaults qmake behavior is to make all project RPATHDIR paths absolute prior passing them to linker. We need to make an exception for paths starting with @ such as @executable_path (Apple platforms) or $ such as $ORIGIN (Linux). Task-number: QTBUG-31814 Change-Id: Ie9887c0046c5030c4128dda945b491a5d389ba34 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
Diffstat (limited to 'qmake')
-rw-r--r--qmake/generators/unix/unixmake.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/qmake/generators/unix/unixmake.cpp b/qmake/generators/unix/unixmake.cpp
index e426180012..484ce19225 100644
--- a/qmake/generators/unix/unixmake.cpp
+++ b/qmake/generators/unix/unixmake.cpp
@@ -171,11 +171,13 @@ UnixMakefileGenerator::init()
}
ProStringList &qmklibs = project->values("QMAKE_LIBS");
qmklibs = ldadd + qmklibs;
- if(!project->isEmpty("QMAKE_RPATHDIR")) {
+ if (!project->isEmpty("QMAKE_RPATHDIR") && !project->isEmpty("QMAKE_LFLAGS_RPATH")) {
const ProStringList &rpathdirs = project->values("QMAKE_RPATHDIR");
- for(int i = 0; i < rpathdirs.size(); ++i) {
- if(!project->isEmpty("QMAKE_LFLAGS_RPATH"))
- project->values("QMAKE_LFLAGS") += var("QMAKE_LFLAGS_RPATH") + escapeFilePath(QFileInfo(rpathdirs[i].toQString()).absoluteFilePath());
+ for (int i = 0; i < rpathdirs.size(); ++i) {
+ QString rpathdir = rpathdirs[i].toQString();
+ if (!rpathdir.startsWith('@') && !rpathdir.startsWith('$'))
+ rpathdir = QFileInfo(rpathdir).absoluteFilePath();
+ project->values("QMAKE_LFLAGS") += var("QMAKE_LFLAGS_RPATH") + escapeFilePath(rpathdir);
}
}
if (!project->isEmpty("QMAKE_RPATHLINKDIR")) {