Details
-
Bug
-
Resolution: Unresolved
-
P1: Critical
-
6.4.2
-
None
-
-
4416a6bd4 (dev), f13ffc2a6 (6.5), 8d1bcf9eb (master)
Description
I have read https://doc.qt.io/qt-6/qt-add-qml-module.html, https://doc.qt.io/qt-6/qtqml-modules-cppplugins.html, https://www.qt.io/blog/introduction-to-the-qml-cmake-api and https://www.qt.io/blog/qml-modules-in-qt-6.2. But after reading that and googling for a while, I do not know what is the best practice to install QML modules with cmake into TARGETDIR. An example would be great, for example in https://doc.qt.io/qt-6/qtqml-modules-cppplugins.html?!
In the last link, the documentation says in Installation:
Eventually, you will have to take care of installation and deployment for your QML modules then. The CMake API for QML modules does not provide an abstraction for this, yet. We intend to provide one in Qt 6.3. Until then, you can manually use CMake's install function to install QML modules.
So supposedly there is an abstraction now with Qt 6.3 (or later)? What is that abstraction, and how should it be used?
Furthermore, the first link says:
If the backing target is a static library and that static library will be installed, OUTPUT_TARGETS should be given to provide a variable in which to store a list of additional targets that will also need to be installed.
But how should the OUTPUT_TARGETS be installed?
Concrete questions:
- Should the cmake install command be used to install the QML module? How?
- How should OUTPUT_TARGETS be installed?
- If the cmake install command can not be used, which other commands should be used?
- More specifically, what is the recommended target directory for QML modules? The official Qt modules seem to go into TARGETDIR/qml/, should user-developed modules use the same? Does that happen automatically or is there something that needs to be done?
Attachments
Issue Links
- relates to
-
QTBUG-114688 QML application does not start if some QML modules are built static
- Closed
-
QTBUG-100102 Provide CMake API for deploying a single QML module
- Reported
-
QTBUG-122986 Document recommended project structure for projects that have a QML module used by two or more executables
- Reported
-
QTBUG-114949 Document SDK deployment of targets which depend on auto-generated resource targets
- Open
- mentioned in
-
Page Loading...
Gerrit Reviews
For Gerrit Dashboard: QTBUG-111946 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
477962,3 | qt_add_qml_module: Set QT_QML_MODULE_QML_FILES correctly | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |
478234,2 | qt_add_qml_module: Set QT_QML_MODULE_QML_FILES correctly | 6.5 | qt/qtdeclarative | Status: MERGED | +2 | 0 |
479782,8 | Convert to cmake | master | qt-labs/umlquick | Status: MERGED | +2 | 0 |