[Interest] creating QML module in a subdirectory of backing target
Stefan Seefeld
stefan at seefeld.name
Wed Aug 14 14:04:14 CEST 2024
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/CMakeLists.txt` calls `addLibrary(A ...)`, and
`A/qml/CMakeLists.txt` calls `qt_add_qml_module(A ...)`
This eventually bails with the error
```
... No rule to make target '.../A/A_qmltyperegistrations.cpp`, needed by '
CMakeFiles/A.dir/a_qmltyperegistrations.cpp.o'
```
If I merge the definition of `qml_add_qml_module` in the outer
CMakeLists.txt file, everything is compiling fine.
Am I missing something ? Is this is known limitation of the build logic ?
Thanks for any hints,
--
...ich hab' noch einen Koffer in Berlin...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20240814/cb8a8518/attachment.htm>
More information about the Interest
mailing list