Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qtp0005.qdoc
Go to the documentation of this file.
1
// Copyright (C) 2023 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
3
4
/*!
5
\page qt-cmake-policy-qtp0005.html
6
\ingroup qt-cmake-policies
7
8
\title QTP0005
9
\keyword qt_cmake_policy_qtp0005
10
11
\summary {qt_add_qml_module's DEPENDENCIES argument accepts targets}
12
13
This policy was introduced in Qt 6.8. It allows passing targets to
14
\l{qt_add_qml_module}{qt_add_qml_module()} \c DEPENDENCIES, \c IMPORTS, \c
15
OPTIONAL_IMPORTS and \c DEFAULT_IMPORTS.
16
17
Enabling this policy means that the arguments which are passed to the key words
18
can be prefixed with TARGET, and are then treated as a target name.
19
20
The \c OLD behavior of this policy is that the "TARGET name" is treated as two
21
URIs, "TARGET" and "name".
22
23
The \c NEW behavior of this policy is that \c TARGET is considered a keyword,
24
and the URI is extracted from the target which follows next. It is a hard error
25
if the name following \c TARGET does not name a target, or if that target does
26
not correspond to a QML module.
27
28
In both the \c NEW and the \c OLD behavior it is possible to specify a module
29
version by appending a slash and the version. See
30
\l{Declaring module dependencies} for more details.
31
32
Qt 6.8 issues warnings if you pass a URI to \c DEPENDENCIES which coincides
33
with a target name.
34
Use the \l qt_policy command to suppress the warning by explicitly setting
35
the policy to \c OLD or \c NEW.
36
37
\qtpolicydeprecatedbehavior
38
39
\sa qt_policy, {qt6_standard_project_setup}{qt_standard_project_setup()},
40
qt_cmake_policies, qt_add_qml_module
41
42
*/
qtdeclarative
src
qml
doc
src
cmake
policy
qtp0005.qdoc
Generated on
for Qt by
1.14.0