1// Copyright (C) 2024 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
5\page qt-cmake-policy-qtp0004.html
6\ingroup qt-cmake-policies
9\keyword qt_cmake_policy_qtp0004
11\summary {Extra directories with QML files in a QML module need extra qmldir files.}
13This policy was introduced in Qt 6.8. It causes the build system to generate
14an extra qmldir file for each additional directory that contains QML files in
17Enabling this policy ensures that the implicit import of each of the QML
18components in your module is the same as the module itself. This means that
19all the components can see each other without explicitly importing the module.
21The \c OLD behavior of this policy is that a qmldir file is only generated for
22the root directory of a module.
24The \c NEW behavior of this policy is that for each directory with QML files in
25a module a separate qmldir file is generated.
27Qt 6.8 issues warnings if you do not explicitly set the policy.
29\qtpolicydeprecatedbehavior
31\sa qt_policy, {qt6_standard_project_setup}{qt_standard_project_setup()},
32 qt_cmake_policies, qt_add_qml_module