aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexandru Croitor <[email protected]>2025-04-04 17:44:00 +0200
committerAlexandru Croitor <[email protected]>2025-04-07 18:31:48 +0200
commit38d26e8d2c87e49e92a5c9d450a8dce23a2de1f0 (patch)
treec30ae4ad68cfcede9854ea1beb0341b7a1796dcf
parent8704b53eac6a19e6b8ae64764e50ba84e59f4fc9 (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 Pick-to: 6.8 6.9 Task-number: QTBUG-109553 Task-number: QTBUG-117948 Change-Id: I1973305f9e81f922e05ffb71429f007bbf902222 Reviewed-by: Alexey Edelev <[email protected]>
-rw-r--r--src/qml/Qt6QmlDeploySupport.cmake4
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()