windeployqt: Directly access the 'relocatable' config feature
Before, we added the preprocessor define QT_RELOCATABLE if the relocatable feature was set and checked for the define in the source code. This indirection is unnecessary. Also, widen the scope of the feature check to avoid some unnecessary code. Change-Id: Ib5f38bf310699d528efdd24edbf14b861bf33935 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
parent
52f4d0b0d2
commit
ef1ff65b0a
@ -28,8 +28,3 @@ qt_internal_extend_target(${target_name} CONDITION WIN32
|
||||
PUBLIC_LIBRARIES
|
||||
shlwapi
|
||||
)
|
||||
|
||||
qt_internal_extend_target(${target_name} CONDITION QT_FEATURE_relocatable
|
||||
DEFINES
|
||||
QT_RELOCATABLE
|
||||
)
|
||||
|
@ -22,6 +22,8 @@
|
||||
#define IMAGE_FILE_MACHINE_ARM64 0xaa64
|
||||
#endif
|
||||
|
||||
#include <QtCore/private/qconfig_p.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <iostream>
|
||||
#include <iterator>
|
||||
@ -1452,16 +1454,16 @@ static DeployResult deploy(const Options &options, const QMap<QString, QString>
|
||||
return result;
|
||||
}
|
||||
|
||||
#if !QT_CONFIG(relocatable)
|
||||
if (options.patchQt && !options.dryRun) {
|
||||
const QString qt6CoreName = QFileInfo(libraryPath(libraryLocation, "Qt6Core", qtLibInfix,
|
||||
options.platform, result.isDebug)).fileName();
|
||||
#ifndef QT_RELOCATABLE
|
||||
if (!patchQtCore(targetPath + u'/' + qt6CoreName, errorMessage)) {
|
||||
std::wcerr << "Warning: " << *errorMessage << '\n';
|
||||
errorMessage->clear();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endif // QT_CONFIG(relocatable)
|
||||
} // optLibraries
|
||||
|
||||
// Update plugins
|
||||
|
Loading…
Reference in New Issue
Block a user