diff options
| author | Alexandru Croitor <alexandru.croitor@qt.io> | 2025-04-04 17:44:00 +0200 |
|---|---|---|
| committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2025-04-09 12:54:16 +0000 |
| commit | 69f652ea5da37ed26202e1ba690266f0676eb7c8 (patch) | |
| tree | 77ce753092a1f66f508469705f89e0e1c6c5518f | |
| parent | 567a14db0e920345d9f428a40156e045299d6348 (diff) | |
CMake: Fix DESTDIR handling for Qml app deployment on Windows
file(INSTALL) was using QT_DEPLOY_PREFIX instead of
CMAKE_INSTALL_PREFIX for the destination path, which ends up adding
$ENV{DESTDIR} twice to the path.
Change the code to use CMAKE_INSTALL_PREFIX directly.
Noticed this while investigating usage of QT_DEPLOY_PREFIX and double
DESTDIR paths for the QTBUG-135620 issue.
Amends 72e5cfeeea69e7682f5b17e3c6fb6f5dd910d292
Augments b6fd3191c1c0fa1697c90b0457e3f9523bbad11d
Task-number: QTBUG-109553
Task-number: QTBUG-117948
Change-Id: I1973305f9e81f922e05ffb71429f007bbf902222
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 38d26e8d2c87e49e92a5c9d450a8dce23a2de1f0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 667891d398ca57542ef04c962b124a9fefd864f2)
| -rw-r--r-- | src/qml/Qt6QmlDeploySupport.cmake | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/qml/Qt6QmlDeploySupport.cmake b/src/qml/Qt6QmlDeploySupport.cmake index 8bf1d6ebd6..4aa7acac08 100644 --- a/src/qml/Qt6QmlDeploySupport.cmake +++ b/src/qml/Qt6QmlDeploySupport.cmake @@ -298,7 +298,9 @@ function(_qt_internal_deploy_qml_imports_for_target) if(__QT_DEPLOY_VERBOSE) message(STATUS "runtime dependency for QML plugin '${entry_PLUGIN}':") endif() - file(INSTALL ${file} DESTINATION "${QT_DEPLOY_PREFIX}/${QT_DEPLOY_BIN_DIR}") + # Use CMAKE_INSTALL_PREFIX here instead of QT_DEPLOY_PREFIX, to avoid + # $ENV{DESTDIR} appearing twice in the path, because file(INSTALL) prepends it. + file(INSTALL ${file} DESTINATION "${CMAKE_INSTALL_PREFIX}/${QT_DEPLOY_BIN_DIR}") endforeach() endif() |
