This variable was introduced in Qt 6.7.
QT_QML_GENERATE_QMLLS_INI
is a boolean that describes whether
qt6_add_qml_module()
calls generate
.qmlls.ini
files inside the
source folder
, into each subdirectory with a CMakeLists.txt file creating a QML module. If
.qmlls.ini
files already exist there, then they are overwritten.
注意:
使用
QT_QML_GENERATE_QMLLS_INI
requires a CMake version >= 3.19.
这些
.qmlls.ini
files contain the path to the last configured build directory, and is needed by
QML 语言服务器
to find user defined modules. See also
QML 语言服务器
about the other ways of passing build folders to QML Language Server.
As This variable is used for IDE integration, it should normally not be set in a project itself, but passed to CMake via an IDE or manually by passing
-DQT_QML_GENERATE_QMLLS_INI=ON
to the cmake executable.
注意:
The files generated by
QT_QML_GENERATE_QMLLS_INI
are only valid for the current configuration and should be ignored by your version control system. For git, this can be done by adding
.qmlls.ini
to your
.gitignore
,例如。