macdeployqt: Don't remove rpaths more than once

In a universal build the tool will find multiple duplicated rpaths,
but the install_name tool doesn't like it if we try to remove it
more than once.

Fixes: QTBUG-109738
Pick-to: 6.5 6.4 6.2
Change-Id: I4a8bea0ad3e47b28e6384ceead551edc83e30d26
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
bb10
Tor Arne Vestbø 2023-01-03 18:49:51 +01:00
parent 40cb7434af
commit 9a2198f9cd
1 changed files with 2 additions and 1 deletions

View File

@ -874,7 +874,8 @@ void deployRPaths(const QString &bundlePath, const QList<QString> &rpaths, const
continue;
}
if (rpaths.contains(resolveDyldPrefix(rpath, binaryPath, binaryPath))) {
args << "-delete_rpath" << rpath;
if (!args.contains(rpath))
args << "-delete_rpath" << rpath;
}
}
if (!args.length()) {