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.
80See \l{qt_target_qml_sources_example}{qt_target_qml_sources()} for an example on
81how to set the \c QT_QML_SINGLETON_TYPE property.
83\sa{qml-source-file-properties}{qt_target_qml_sources}
88\page cmake-source-file-property-qt-qml-skip-cachegen.html
89\ingroup cmake-source-file-properties-qtqml
91\title QT_QML_SKIP_CACHEGEN
93\summary {Excludes a file from being compiled to byte code.}
95\cmakepropertysince 6.2
97Set this property to \c TRUE to prevent the \c{.qml} file from being compiled to byte code.
98The file will still be added to the \c target as a resource in uncompiled form
99(see \l{qmlcachegen-auto}{Caching compiled QML sources}).
101\sa{qml-source-file-properties}{qt_target_qml_sources}
106\page cmake-source-file-property-qt-qml-skip-qmldir-entry.html
107\ingroup cmake-source-file-properties-qtqml
109\title QT_QML_SKIP_QMLDIR_ENTRY
111\summary {Excludes a file from being added as a type to the QML module's typeinfo file.}
113\cmakepropertysince 6.2
115Set this property to \c TRUE to prevent
116the \c{.qml} file from being added as a type to the QML module's typeinfo file
117(see \l{qmldir-autogeneration}{Auto-generating \c{qmldir} and typeinfo files}).
119\sa{qml-source-file-properties}{qt_target_qml_sources}
124\page cmake-source-file-property-qt-qml-skip-qmllint.html
125\ingroup cmake-source-file-properties-qtqml
127\title QT_QML_SKIP_QMLLINT
129\summary {Prevents a file from being included in automatic qmllint processing.}
131\cmakepropertysince 6.2
133Set this property to \c TRUE to prevent the file from being included in
134\l{qmllint-auto}{automatic qmllint processing}.
136\sa{qml-source-file-properties}{qt_target_qml_sources}
141\page cmake-source-file-property-qt-qml-source-typename.html
142\ingroup cmake-source-file-properties-qtqml
144\title QT_QML_SOURCE_TYPENAME
146\summary {Overrides the type name provided by the file.}
148\cmakepropertysince 6.2
150Use this property to override the \c QML type name provided by this file.
152\sa{qml-source-file-properties}{qt_target_qml_sources}
157\page cmake-source-file-property-qt-qml-source-versions.html
158\ingroup cmake-source-file-properties-qtqml
160\title QT_QML_SOURCE_VERSIONS
162\summary {Specifies a custom set of versions for a type.}
164\cmakepropertysince 6.2
166When the file needs to provide type entries for a custom set of versions,
167for example when the QML types were first introduced in a minor patch
168version after the \c{.0} release, specify those versions using this property.
170\sa{qml-source-file-properties}{qt_target_qml_sources}
175\page cmake-source-file-property-qt-qmltc-file-basename.html
176\ingroup cmake-source-file-properties-qtqml
178\title QT_QMLTC_FILE_BASENAME
180\summary {Specifies a non-default .h and .cpp file name.}
182\cmakepropertysince 6.3
183\preliminarycmakeproperty
185Use this property to specify a non-default \c .h and \c .cpp file name, which helps to resolve
186conflicting file names.
192\page cmake-source-file-property-qt-qml-skip-type-compiler.html
193\ingroup cmake-source-file-properties-qtqml
195\title QT_QML_SKIP_TYPE_COMPILER
197\summary {Excludes a file from being compiled to C++ using qmltc.}
199\cmakepropertysince 6.4
200\preliminarycmakeproperty
202Set this property to \c TRUE to prevent the \c{.qml} file from being compiled to
203C++ during qmltc compilation.