Assume I have built my project, including an invocation to
`qt_add_qml_module()`, so my build tree now contains a QML module, which is
useable once I adjust my QML import path appropriately.
What is the right incantation to install that QML module, or, for that
matter, package it with the rest of
I'm still trying to generate an QML module from some legacy code.
Consider this layout:
.
├── A
│ ├── A.cpp
│ ├── A.h
│ └── CMakeLists.txt
├── B
│ ├── B.cpp
│ ├── B.h
│ ├── CMakeLists.txt
│ ├── QML.cpp
│ └── QML.h
└── CMakeLists.txt
Subdirectory `A/` generates a DSO `libA.so` cont
Thanks James,
I'm not sure your suggestion works for me. But to even consider hacking
around a limitation, I need to understand the limitation. Hence I'm asking:
is something wrong in the way I approach this ? Is my code layout not
supported ? I couldn't find any documentation related to this...
Hi Stefan,
Here’s what works for me in Qt 6.5+:
In A/CMakeLists.txt:
add_subdirectory(qml)
In A/qml/CMakeLists.txt:
qt_add_library(qml STATIC)
qt_add_qml_module(qml
URI qml
QML_FILES
hello,
in a large CMake / Qt project of mine, I'm building a (shared) library in
some directory `A`.
Now I want to add a QML module for that, but due to various constraints
want to do that in a subdirectory `A/qml`.
That is, I have
A/
├── CMakeLists.txt
├── qml
│ ├── CMakeLists.txt
where `A/CM