-
Bug
-
Resolution: Fixed
-
P3: Somewhat important
-
6.2.0 Beta1
-
None
If you try to use the qt6_add_qml_module function to create a plugin using an already existing library as a backing library and this library is build in a different folder (different CMakeLists.txt) the configure step fails with the following error:
CMake Error at /home/gagi/work/build/qt6/qtbase/lib/cmake/Qt6Core/Qt6CoreMacros.cmake:2020 (add_library):
Cannot find source file:
.../mytestlib_qmltyperegistrations.cpp
Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm
.hpp .hxx .in .txx
When using the qt6_add_qml_module function in the same CMakeLists.txt than the backing library it works as intended.
This is especially a problem when porting bigger qmake projects, as those usually have their libraries and plugins split into different folders and reusing this folder structure is not possible.
- relates to
-
QTBUG-130791 qt_target_qml_sources cannot be subdir of qt_add_qml_module
-
- Closed
-
| For Gerrit Dashboard: QTBUG-95200 | ||||||
|---|---|---|---|---|---|---|
| # | Subject | Branch | Project | Status | CR | V |
| 369458,3 | Fix dependencies on sources generated in a different scope to target | dev | qt/qtbase | Status: MERGED | +2 | 0 |
| 369460,4 | Fix dependencies on sources generated in a different scope to target | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |
| 369659,2 | Fix dependencies on sources generated in a different scope to target | 6.2 | qt/qtdeclarative | Status: MERGED | +2 | 0 |
| 369747,2 | Fix dependencies on sources generated in a different scope to target | 6.2 | qt/qtbase | Status: MERGED | +2 | 0 |