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
Change-Id: I4a8bea0ad3e47b28e6384ceead551edc83e30d26
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
(cherry picked from commit 9a2198f9cdd5df482c64a52cb5d1e372ac24610c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Tor Arne Vestbø 2023-01-03 18:49:51 +01:00 committed by Qt Cherry-pick Bot
parent 073bc79b50
commit 283d5c96ec

View File

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