diff options
| author | Joerg Bornemann <joerg.bornemann@qt.io> | 2022-08-22 15:47:02 +0200 |
|---|---|---|
| committer | Joerg Bornemann <joerg.bornemann@qt.io> | 2022-08-25 19:37:29 +0200 |
| commit | ef1ff65b0a3da280a33dacf94e9c3d54ba42671d (patch) | |
| tree | 17dd67548e1af8ad50b23b4c4ba42efb3af8a538 | |
| parent | 52f4d0b0d2a29a08e55293664bf1c8002cad0d17 (diff) | |
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>
| -rw-r--r-- | src/tools/windeployqt/CMakeLists.txt | 5 | ||||
| -rw-r--r-- | src/tools/windeployqt/main.cpp | 6 |
2 files changed, 4 insertions, 7 deletions
diff --git a/src/tools/windeployqt/CMakeLists.txt b/src/tools/windeployqt/CMakeLists.txt index 4531124f315..e1ea486595a 100644 --- a/src/tools/windeployqt/CMakeLists.txt +++ b/src/tools/windeployqt/CMakeLists.txt @@ -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 -) diff --git a/src/tools/windeployqt/main.cpp b/src/tools/windeployqt/main.cpp index 9d483e123fa..132b3d5d258 100644 --- a/src/tools/windeployqt/main.cpp +++ b/src/tools/windeployqt/main.cpp @@ -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 |
