diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2022-06-10 15:51:08 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2023-01-27 19:16:39 +0100 |
commit | 2d44365f69b9bc946d085c6b149e2ac319700265 (patch) | |
tree | 966cc5dcab9ef9bc3f9ab255b602bf624b692bd0 /src/qml/doc/src/cmake/qt_add_qml_module.qdoc | |
parent | d34d035022f9c7b9957cfb2abe0ba90486416ae2 (diff) |
CMake: Allow omitting the version of QML modules
Also, drop all the VERSION 1.0 lines from the examples and tests. 1.0 is
actually a bad default version since it's before all the Qt versions.
[ChangeLog][QML] You can now omit the VERSION argument to
qt_add_qml_module(). This will automatically generate the highest
possible version.
Pick-to: 6.5
Task-number: QTBUG-99146
Change-Id: Ic10ec69b87c224e0e94e1785f65653815d4c778c
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
Diffstat (limited to 'src/qml/doc/src/cmake/qt_add_qml_module.qdoc')
-rw-r--r-- | src/qml/doc/src/cmake/qt_add_qml_module.qdoc | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/qml/doc/src/cmake/qt_add_qml_module.qdoc b/src/qml/doc/src/cmake/qt_add_qml_module.qdoc index fc0ad59d51..e12b3a6f24 100644 --- a/src/qml/doc/src/cmake/qt_add_qml_module.qdoc +++ b/src/qml/doc/src/cmake/qt_add_qml_module.qdoc @@ -18,7 +18,7 @@ qt_add_qml_module( target URI uri - VERSION version + [VERSION version] [PAST_MAJOR_VERSIONS ...] [STATIC | SHARED] [PLUGIN_TARGET plugin_target] @@ -363,7 +363,9 @@ alphanumeric or dot characters. Other QML modules may use this name in \l{Module Definition qmldir Files}{qmldir} file. The \c URI is also used to form the \e{target path} by replacing dots with forward slashes. -A QML module must also define a \c VERSION in the form \c{Major.Minor}, where +\section2 Versions + +A QML module can also define a \c VERSION in the form \c{Major.Minor}, where both \c Major and \c Minor must be integers. An additional \c{.Patch} component may be appended, but will be ignored. A list of earlier major versions the module provides types for can also optionally be given after the @@ -373,6 +375,11 @@ in-depth discussion of the module URI and version numbering, \l{Registering past major versions} for registering past major versions, and \l{Keeping module versions in sync} for keeping module versions in sync. +If you don't need versions you should omit the \c VERSION argument. It defaults +to the highest possible version. Internal versioning of QML modules has some +fundamental flaws. You should use an external package management mechanism to +manage different versions of your QML modules. + \section2 Adding sources and resources to the module \c SOURCES specifies a list of non-QML sources to be added to the backing |