diff --git a/share/qtcreator/templates/wizards/projects/consoleapp/CMakeLists-Qt6.txt b/share/qtcreator/templates/wizards/projects/consoleapp/CMakeLists-Qt6.txt index 46c49001bfd..a4161a01f5d 100644 --- a/share/qtcreator/templates/wizards/projects/consoleapp/CMakeLists-Qt6.txt +++ b/share/qtcreator/templates/wizards/projects/consoleapp/CMakeLists-Qt6.txt @@ -24,3 +24,16 @@ target_link_libraries(%{ProjectName} PRIVATE Qt::Core ) + +install(TARGETS %{ProjectName} + BUNDLE DESTINATION . + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} +) + +qt_generate_deploy_app_script( + TARGET %{ProjectName} + OUTPUT_SCRIPT deploy_script + NO_UNSUPPORTED_PLATFORM_ERROR +) +install(SCRIPT ${deploy_script}) diff --git a/share/qtcreator/templates/wizards/projects/qtwidgetsapplication/CMakeLists-Qt6.txt b/share/qtcreator/templates/wizards/projects/qtwidgetsapplication/CMakeLists-Qt6.txt index fef89267021..7f63269cdd0 100644 --- a/share/qtcreator/templates/wizards/projects/qtwidgetsapplication/CMakeLists-Qt6.txt +++ b/share/qtcreator/templates/wizards/projects/qtwidgetsapplication/CMakeLists-Qt6.txt @@ -31,3 +31,16 @@ target_link_libraries(%{ProjectName} Qt::Core Qt::Widgets ) + +install(TARGETS %{ProjectName} + BUNDLE DESTINATION . + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} +) + +qt_generate_deploy_app_script( + TARGET %{ProjectName} + OUTPUT_SCRIPT deploy_script + NO_UNSUPPORTED_PLATFORM_ERROR +) +install(SCRIPT ${deploy_script})