1// Copyright (C) 2022 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
5\group cmake-global-properties-qtqml
6\title CMake Global Properties in Qt6 Qml
8\l{CMake Command Reference#Qt6::Qml}{CMake Commands} know about the following
9global CMake properties:
11\sa{CMake Property Reference}
16\page cmake-global-property-qt-qmllinter-targets-folder.html
17\ingroup cmake-properties-qtqml
18\ingroup cmake-global-properties-qtqml
20\title QT_QMLLINTER_TARGETS_FOLDER
22\brief Sets the FOLDER property for targets that belong to the QML linter.
24\cmakepropertysince 6.5
25\preliminarycmakeproperty
27Name of the \l FOLDER for targets that are related to the QML linter.
29By default, this property is set to \c{QmlLinter}.
31This property only has an effect if CMake's \l USE_FOLDERS property is \c{ON}.
33You can enable folder support by calling
34\l{qt6_standard_project_setup}{qt_standard_project_setup}.
39\group cmake-source-file-properties-qtqml
40\title CMake Source File Properties in Qt6 Qml
42\l{CMake Command Reference#Qt6::Qml}{CMake Commands} know about the following
43CMake source file properties:
45\sa{CMake Property Reference}
50\page cmake-source-file-property-qt-qml-internal-type.html
51\ingroup cmake-source-file-properties-qtqml
53\title QT_QML_INTERNAL_TYPE
55\summary {Marks a QML file as providing an internal type.}
57\cmakepropertysince 6.2
59Set this property to \c TRUE to indicate that the \c{.qml} file provides an internal type.
61\sa{qml-source-file-properties}{qt_target_qml_sources}
66\page cmake-source-file-property-qt-qml-singleton-type.html
67\ingroup cmake-source-file-properties-qtqml
69\title QT_QML_SINGLETON_TYPE
71\summary {Marks a QML file as providing a singleton type.}
73\cmakepropertysince 6.2
75A \c{.qml} file that provides a singleton type needs to have its \c QT_QML_SINGLETON_TYPE source
76property set to \c TRUE to ensure that the singleton command is written into the
77\l{Module Definition qmldir Files}{qmldir} file.
78This must be done in addition to the QML file containing the \c {pragma Singleton} statement.
79The source property must be set before \l{qt_add_qml_module}{creating} the module the
82See \l{qt_target_qml_sources_example}{qt_target_qml_sources()} for an example on
83how to set the \c QT_QML_SINGLETON_TYPE property.
85\sa{qml-source-file-properties}{qt_target_qml_sources}
90\page cmake-source-file-property-qt-qml-skip-cachegen.html
91\ingroup cmake-source-file-properties-qtqml
93\title QT_QML_SKIP_CACHEGEN
95\summary {Excludes a file from being compiled to byte code.}
97\cmakepropertysince 6.2
99Set this property to \c TRUE to prevent the \c{.qml} file from being compiled to byte code.
100The file will still be added to the \c target as a resource in uncompiled form
101(see \l{qmlcachegen-auto}{Caching compiled QML sources}).
103\sa{qml-source-file-properties}{qt_target_qml_sources}
108\page cmake-source-file-property-qt-qml-skip-qmldir-entry.html
109\ingroup cmake-source-file-properties-qtqml
111\title QT_QML_SKIP_QMLDIR_ENTRY
113\summary {Excludes a file from being added as a type to the QML module's typeinfo file.}
115\cmakepropertysince 6.2
117Set this property to \c TRUE to prevent
118the \c{.qml} file from being added as a type to the QML module's typeinfo file
119(see \l{qmldir-autogeneration}{Auto-generating \c{qmldir} and typeinfo files}).
121\sa{qml-source-file-properties}{qt_target_qml_sources}
126\page cmake-source-file-property-qt-qml-skip-qmllint.html
127\ingroup cmake-source-file-properties-qtqml
129\title QT_QML_SKIP_QMLLINT
131\summary {Prevents a file from being included in automatic qmllint processing.}
133\cmakepropertysince 6.2
135Set this property to \c TRUE to prevent the file from being included in
136\l{qmllint-auto}{automatic qmllint processing}.
138\sa{qml-source-file-properties}{qt_target_qml_sources}
143\page cmake-source-file-property-qt-qml-source-typename.html
144\ingroup cmake-source-file-properties-qtqml
146\title QT_QML_SOURCE_TYPENAME
148\summary {Overrides the type name provided by the file.}
150\cmakepropertysince 6.2
152Use this property to override the \c QML type name provided by this file.
154\sa{qml-source-file-properties}{qt_target_qml_sources}
159\page cmake-source-file-property-qt-qml-source-versions.html
160\ingroup cmake-source-file-properties-qtqml
162\title QT_QML_SOURCE_VERSIONS
164\summary {Specifies a custom set of versions for a type.}
166\cmakepropertysince 6.2
168When the file needs to provide type entries for a custom set of versions,
169for example when the QML types were first introduced in a minor patch
170version after the \c{.0} release, specify those versions using this property.
172\sa{qml-source-file-properties}{qt_target_qml_sources}
177\page cmake-source-file-property-qt-qmltc-file-basename.html
178\ingroup cmake-source-file-properties-qtqml
180\title QT_QMLTC_FILE_BASENAME
182\summary {Specifies a non-default .h and .cpp file name.}
184\cmakepropertysince 6.3
185\preliminarycmakeproperty
187Use this property to specify a non-default \c .h and \c .cpp file name, which helps to resolve
188conflicting file names.
194\page cmake-source-file-property-qt-qml-skip-type-compiler.html
195\ingroup cmake-source-file-properties-qtqml
197\title QT_QML_SKIP_TYPE_COMPILER
199\summary {Excludes a file from being compiled to C++ using qmltc.}
201\cmakepropertysince 6.4
202\preliminarycmakeproperty
204Set this property to \c TRUE to prevent the \c{.qml} file from being compiled to
205C++ during qmltc compilation.