arg `EXCLUDE_PLUGINS` do not work for `qt_generate_deploy_app_script` command for qt 6.11.0
-
my cmake scripts:
qt_generate_deploy_app_script( TARGET demo-app OUTPUT_SCRIPT deploy_script NO_UNSUPPORTED_PLATFORM_ERROR EXCLUDE_PLUGINS "qtpassthrucanbus;qttinycanbus;qtvirtualcanbus;qtsocketcanbus;qgif;qtga;qtiff;qwbmp;qwebp" NO_TRANSLATIONS ) install(SCRIPT ${deploy_script})During the cmake install, I found EXCLUDE_PLUGINS do not works, the output still got the plugins which I DO NOT WANT.
At the end, I found the implementation of cmake function
_qt_internal_get_qt_plugins_to_deploygot typo, miss spellarg_EXCLUDEDasarg_EXCLUDE. It roughly located atcmake/Qt6Core/Qt6CoreDeploySupport.cmake:388.
Make it works, should change :
_qt_internal_plugin_file_path_match(excluded "${file_path}" "${arg_EXCLUDED}")
into
_qt_internal_plugin_file_path_match(excluded "${file_path}" "${arg_EXCLUDE}") -
Thx for the detailed analysis, this indeed looks like a bug. I've created one here: https://qt-project.atlassian.net/browse/QTBUG-145874
-
Fixed in Qt dev, integration for Qt 6.11 is on the way