Qt 6.x
The Qt SDK
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
cmake-properties.qdoc
Go to the documentation of this file.
1// Copyright (C) 2022 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
3
4/*!
5\group cmake-global-properties-qtqml
6\title CMake Global Properties in Qt6 Qml
7
8\l{CMake Command Reference#Qt6::Qml}{CMake Commands} know about the following
9global CMake properties:
10
11\sa{CMake Property Reference}
12*/
13
14
15/*!
16\page cmake-global-property-qt-qmllinter-targets-folder.html
17\ingroup cmake-properties-qtqml
18\ingroup cmake-global-properties-qtqml
19
20\title QT_QMLLINTER_TARGETS_FOLDER
21
22\brief Sets the FOLDER property for targets that belong to the QML linter.
23
24\cmakepropertysince 6.5
25\preliminarycmakeproperty
26
27Name of the \l FOLDER for targets that are related to the QML linter.
28
29By default, this property is set to \c{QmlLinter}.
30
31This property only has an effect if CMake's \l USE_FOLDERS property is \c{ON}.
32
33You can enable folder support by calling
34\l{qt6_standard_project_setup}{qt_standard_project_setup}.
35*/
36
37
38/*!
39\group cmake-source-file-properties-qtqml
40\title CMake Source File Properties in Qt6 Qml
41
42\l{CMake Command Reference#Qt6::Qml}{CMake Commands} know about the following
43CMake source file properties:
44
45\sa{CMake Property Reference}
46*/
47
48
49/*!
50\page cmake-source-file-property-qt-qml-internal-type.html
51\ingroup cmake-source-file-properties-qtqml
52
53\title QT_QML_INTERNAL_TYPE
54
55\summary {Marks a QML file as providing an internal type.}
56
57\cmakepropertysince 6.2
58
59Set this property to \c TRUE to indicate that the \c{.qml} file provides an internal type.
60
61\sa{qml-source-file-properties}{qt_target_qml_sources}
62*/
63
64
65/*!
66\page cmake-source-file-property-qt-qml-singleton-type.html
67\ingroup cmake-source-file-properties-qtqml
68
69\title QT_QML_SINGLETON_TYPE
70
71\summary {Marks a QML file as providing a singleton type.}
72
73\cmakepropertysince 6.2
74
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.
79
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.
82
83\sa{qml-source-file-properties}{qt_target_qml_sources}
84*/
85
86
87/*!
88\page cmake-source-file-property-qt-qml-skip-cachegen.html
89\ingroup cmake-source-file-properties-qtqml
90
91\title QT_QML_SKIP_CACHEGEN
92
93\summary {Excludes a file from being compiled to byte code.}
94
95\cmakepropertysince 6.2
96
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}).
100
101\sa{qml-source-file-properties}{qt_target_qml_sources}
102*/
103
104
105/*!
106\page cmake-source-file-property-qt-qml-skip-qmldir-entry.html
107\ingroup cmake-source-file-properties-qtqml
108
109\title QT_QML_SKIP_QMLDIR_ENTRY
110
111\summary {Excludes a file from being added as a type to the QML module's typeinfo file.}
112
113\cmakepropertysince 6.2
114
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}).
118
119\sa{qml-source-file-properties}{qt_target_qml_sources}
120*/
121
122
123/*!
124\page cmake-source-file-property-qt-qml-skip-qmllint.html
125\ingroup cmake-source-file-properties-qtqml
126
127\title QT_QML_SKIP_QMLLINT
128
129\summary {Prevents a file from being included in automatic qmllint processing.}
130
131\cmakepropertysince 6.2
132
133Set this property to \c TRUE to prevent the file from being included in
134\l{qmllint-auto}{automatic qmllint processing}.
135
136\sa{qml-source-file-properties}{qt_target_qml_sources}
137*/
138
139
140/*!
141\page cmake-source-file-property-qt-qml-source-typename.html
142\ingroup cmake-source-file-properties-qtqml
143
144\title QT_QML_SOURCE_TYPENAME
145
146\summary {Overrides the type name provided by the file.}
147
148\cmakepropertysince 6.2
149
150Use this property to override the \c QML type name provided by this file.
151
152\sa{qml-source-file-properties}{qt_target_qml_sources}
153*/
154
155
156/*!
157\page cmake-source-file-property-qt-qml-source-versions.html
158\ingroup cmake-source-file-properties-qtqml
159
160\title QT_QML_SOURCE_VERSIONS
161
162\summary {Specifies a custom set of versions for a type.}
163
164\cmakepropertysince 6.2
165
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.
169
170\sa{qml-source-file-properties}{qt_target_qml_sources}
171*/
172
173
174/*!
175\page cmake-source-file-property-qt-qmltc-file-basename.html
176\ingroup cmake-source-file-properties-qtqml
177
178\title QT_QMLTC_FILE_BASENAME
179
180\summary {Specifies a non-default .h and .cpp file name.}
181
182\cmakepropertysince 6.3
183\preliminarycmakeproperty
184
185Use this property to specify a non-default \c .h and \c .cpp file name, which helps to resolve
186conflicting file names.
187
188\sa{qmltc-cmake}
189*/
190
191/*!
192\page cmake-source-file-property-qt-qml-skip-type-compiler.html
193\ingroup cmake-source-file-properties-qtqml
194
195\title QT_QML_SKIP_TYPE_COMPILER
196
197\summary {Excludes a file from being compiled to C++ using qmltc.}
198
199\cmakepropertysince 6.4
200\preliminarycmakeproperty
201
202Set this property to \c TRUE to prevent the \c{.qml} file from being compiled to
203C++ during qmltc compilation.
204
205\sa{qmltc-cmake}
206*/