Details
-
Bug
-
Resolution: Out of scope
-
P2: Important
-
None
-
6.6.2
-
None
Description
The deployment of our application fails because qt6_deploy_runtime_dependencies() does not append the qmldir parameter to the command line invocation of windeployqt.exe.
qt_generate_deploy_script( TARGET test OUTPUT_SCRIPT deploy_script CONTENT " qt_deploy_runtime_dependencies( EXECUTABLE \"${CMAKE_BINARY_DIR}/test/test.exe\" BIN_DIR \".\" QML_DIR \"${CMAKE_BINARY_DIR}/test/temp_qml\" )" ) install(SCRIPT ${deploy_script})
leads to the following invocation:
'C:/Qt/6.6.2/msvc2019_64/bin/windeployqt.exe' 'C:/source/prj/build/test/test.exe' '--dir' '.' '--libdir' '.' '--plugindir' 'plugins' '--force' '--qtpaths' 'C:/Qt/6.6.2/msvc2019_64/bin/qtpaths.exe'
when it should lead to:
'C:/Qt/6.6.2/msvc2019_64/bin/windeployqt.exe' 'C:/source/prj/build/test/test.exe' '--dir' '.' '--libdir' '.' '--plugindir' 'plugins' '--qmldir' 'C:/source/prj/build/test/temp_qml' '--force' '--qtpaths' 'C:/Qt/6.6.2/msvc2019_64/bin/qtpaths.exe'
If I execute the second invocation that includes qmldir manually, the deployed app works fine.
According to the help of windeployqt.exe:
--qmldir <directory> Scan for QML-imports starting from directory.
So without the parameter, the necessary QML files are not deployed alongside the app.
Adding
--qmldir "${arg_QML_DIR}"
to qtbase/src/corelib/Qt6CoreDeploySupport.cmake at 6.6.2 - qt/qtbase - GitHub
fixes the automatic deployment of the app.
However, this collides with the dev branch because it is conflating the qmldir argument with the qml-deploy-dir.