tst_macdeployqt: Only pass -use-debug-libs for debug-and-release builds

When passing -use-debug-libs to macdeployqt it will only consider plugins
that end with _debug.dylib, which is not the case for single-configuration
framework builds as of d3be87ff1d558f05309b1f29f7e71f291498584f.

When not passing -use-debug-libs macdeployqt will use whatever library
it finds, both suffixed and not, so the only case where we need to
explicitly make it choose one is when we have a debug-and-release
build of Qt. Otherwise we can leave macdeployqt to choose the right
one.

Change-Id: Ic438da9f21c3090f0d57ce615bc0c0969b9a600d
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
(cherry picked from commit 60550f8acc4f9d742f6ef7cb027f0ed3e2d5e42a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Tor Arne Vestbø 2024-07-08 16:14:16 +02:00 committed by Qt Cherry-pick Bot
parent 52c9346f5b
commit de7a39866c

View File

@ -162,7 +162,7 @@ bool deploy(const QString &name, const QStringList &options, QString *errorMessa
QString bundle = name + ".app";
QString path = buildPath(name);
QStringList args = QStringList() << bundle << options;
#if defined(QT_DEBUG)
#if defined(QT_DEBUG) && QT_CONFIG(debug_and_release)
args << "-use-debug-libs";
#endif
if (lcTests().isDebugEnabled())