Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
QDS 4.6.2
-
None
-
Qt Design Studio 4.6.2
Windows 11 23H2
-
QDS Berlin - 2025 Week 3/4, QDS Berlin - 2025 Week 5/6, QDS Berlin - 2025 Week 7/8
Description
- Unzip attached example 'QtDS_BUG_Demo.zip'
- Open 'QtDS_BUG_Demo.qmlproject' with Qt Design Studio
- Note: 'CMake Generator' is enabled,'QtDS_BUG_Demo.qmlproject' Line 24 'mockImports' variable contains item "mock"
- EXPECTED: 'CMakeLists.txt' is not generated in 'mock' folder, 'qds.cmake' does not contain 'add_subdirectory(mock)'
- ACTUAL: 'CMakeLists.txt' is generated in 'mock' folder,'qds.cmake' contains 'add_subdirectory(mock)' line, which conflicts with the real library, resulting in an error when compiling in Qt Creator, as shown below:
[cmake] CMake Error at D:/Qt/6.8.0/msvc2022_64/lib/cmake/Qt6Qml/Qt6QmlMacros.cmake:539 (message): [cmake] Output directory for target "MyObject" is already used by another QML [cmake] module (target "Myobject"). Output directory is: [cmake] [cmake] C:/Users/username/Documents/QtDS_BUG_Demo/build/Desktop_Qt_6_8_0_MSVC2022_64bit-Debug/qml/MyObject [cmake] [cmake] Call Stack (most recent call first): [cmake] mock/MyObject/CMakeLists.txt:7 (qt6_add_qml_module) [cmake] [cmake] [cmake] -- Configuring incomplete, errors occurred!