diff options
author | Alexandru Croitor <[email protected]> | 2021-03-11 10:05:55 +0100 |
---|---|---|
committer | Alexandru Croitor <[email protected]> | 2021-03-15 08:45:12 +0000 |
commit | af184fdd4c5e77048bf876f18ed8355fff5595e1 (patch) | |
tree | 6c6de4e8e1ffbaa7325aa5d2d09b6afb4425450f | |
parent | 5fbef6c060bd437f2e749f240031576aafdbd942 (diff) |
CMake Wizards: Add Qt 6 specific static qml plugin importingv4.15.0-beta1
For Qml / Qt Quick projects to work with static Qt builds, the
application targets need to link to the static Qml plugins, which
is done by calling qt_import_qml_plugins.
Starting with Qt 6.1 and CMake 3.18+ that will be done automatically in
qt_add_application via qt_finalize_executable, as per
c71c48f5125c116f01f615f51f10e4f2877b2b1d
But for Qt 6.0 and lower CMake versions, we need to call
qt_import_qml_plugins manually, thus we include it in the
Qt Quick wizard template so that it works with all Qt 6 versions
and lower CMake versions.
Amends b72c1d11e610340ef86188c964f3a7f8adda1ae9.
Task-number: QTCREATORBUG-23574
Change-Id: Id8db3352ecbb8441eda9f5c9638c7ea6ac1fee96
Reviewed-by: Eike Ziller <[email protected]>
-rw-r--r-- | share/qtcreator/templates/wizards/projects/qtquickapplication/CMakeLists.txt | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/share/qtcreator/templates/wizards/projects/qtquickapplication/CMakeLists.txt b/share/qtcreator/templates/wizards/projects/qtquickapplication/CMakeLists.txt index aeefa3af1f8..067ecb4f0a8 100644 --- a/share/qtcreator/templates/wizards/projects/qtquickapplication/CMakeLists.txt +++ b/share/qtcreator/templates/wizards/projects/qtquickapplication/CMakeLists.txt @@ -76,3 +76,7 @@ set_target_properties(%{ProjectName} PROPERTIES MACOSX_BUNDLE_BUNDLE_VERSION ${PROJECT_VERSION} MACOSX_BUNDLE_SHORT_VERSION_STRING ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR} ) + +if(QT_VERSION_MAJOR EQUAL 6) + qt_import_qml_plugins(%{ProjectName}) +endif() |