Details
-
Bug
-
Resolution: Fixed
-
P3: Somewhat important
-
6.2.0 Beta1
-
None
Description
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.
Attachments
Issue Links
- relates to
-
QTBUG-130791 qt_target_qml_sources cannot be subdir of qt_add_qml_module
- Open