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>
This commit is contained in:
parent
8f22f242a2
commit
dbb0d54699
@ -171,11 +171,13 @@ UnixMakefileGenerator::init()
|
|||||||
}
|
}
|
||||||
ProStringList &qmklibs = project->values("QMAKE_LIBS");
|
ProStringList &qmklibs = project->values("QMAKE_LIBS");
|
||||||
qmklibs = ldadd + qmklibs;
|
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");
|
const ProStringList &rpathdirs = project->values("QMAKE_RPATHDIR");
|
||||||
for (int i = 0; i < rpathdirs.size(); ++i) {
|
for (int i = 0; i < rpathdirs.size(); ++i) {
|
||||||
if(!project->isEmpty("QMAKE_LFLAGS_RPATH"))
|
QString rpathdir = rpathdirs[i].toQString();
|
||||||
project->values("QMAKE_LFLAGS") += var("QMAKE_LFLAGS_RPATH") + escapeFilePath(QFileInfo(rpathdirs[i].toQString()).absoluteFilePath());
|
if (!rpathdir.startsWith('@') && !rpathdir.startsWith('$'))
|
||||||
|
rpathdir = QFileInfo(rpathdir).absoluteFilePath();
|
||||||
|
project->values("QMAKE_LFLAGS") += var("QMAKE_LFLAGS_RPATH") + escapeFilePath(rpathdir);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!project->isEmpty("QMAKE_RPATHLINKDIR")) {
|
if (!project->isEmpty("QMAKE_RPATHLINKDIR")) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user