-
Bug
-
Resolution: Fixed
-
P3: Somewhat important
-
6.5.2, 6.5.3, 6.6.0 Beta2, 6.6.0
-
Windows 10 22H2, MSVC 2019 and MinGW 11.2; Ubuntu 20.04 WSL2
-
-
b6b2501e7 (dev), d7ab13edf (6.6), aa2032f41 (tqtc/lts-6.5)
The attached project has the following subdirectory:
# MyModule/CMakeLists.txt cmake_minimum_required(VERSION 3.16) project(MyModule) qt_add_qml_module(MyModule STATIC NO_LINT # Does not prevent build error from `all_qmllint` URI MyModule VERSION 1.0 SOURCES cppobj.h # QML_ELEMENT only # QML_FILES MyItem.qml # Adding a *.qml file makes everything work as expected )
Problem
Building the `all_qmllint` target causes an error:
[10/11 20.7/sec] cd /D D:\QtSupport\Unlintable\MyModule FAILED: MyModule/CMakeFiles/MyModule_qmllint D:/QtSupport/build-Unlintable-Desktop_Qt_6_5_2_MSVC2019_64bit-Debug/MyModule/CMakeFiles/MyModule_qmllint cd /D D:\QtSupport\Unlintable\MyModule CreateProcess failed: The system cannot find the file specified. ninja: fatal: ReadFile: The handle is invalid.
Workaround
Add a dummy/unused *.qml file to the module