diff options
| author | Ulf Hermann <ulf.hermann@qt.io> | 2024-09-09 11:56:34 +0200 |
|---|---|---|
| committer | Ulf Hermann <ulf.hermann@qt.io> | 2024-09-10 15:51:02 +0200 |
| commit | 453846076b07d5cb10854d90b3bf2572f7f55ab2 (patch) | |
| tree | ac43a0cdd4cd7af6b5437b1b098e57a488ce41a8 | |
| parent | c2ff06f90efc00ae9b256f025d218f98c249a797 (diff) | |
CMake: Fix NO_GENERATE_EXTRA_QMLDIRS
It should be propagated from qt_internal_add_qml_module and it should
actually suppress the QTP0004 warning.
Amends commit ebced4ce63aa85e3f3a6336a0140ca05e65b325d
Pick-to: 6.8
Change-Id: I1aa6a245f90862f323b43374282ad4d258826e63
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
| -rw-r--r-- | src/qml/Qt6QmlBuildInternals.cmake | 1 | ||||
| -rw-r--r-- | src/qml/Qt6QmlMacros.cmake | 5 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/qml/Qt6QmlBuildInternals.cmake b/src/qml/Qt6QmlBuildInternals.cmake index 7b181fabde..b70dd633a8 100644 --- a/src/qml/Qt6QmlBuildInternals.cmake +++ b/src/qml/Qt6QmlBuildInternals.cmake @@ -19,6 +19,7 @@ macro(qt_internal_get_internal_add_qml_module_keywords NO_GENERATE_PLUGIN_SOURCE NO_GENERATE_QMLTYPES NO_GENERATE_QMLDIR + NO_GENERATE_EXTRA_QMLDIRS NO_LINT NO_CACHEGEN ENABLE_TYPE_COMPILER diff --git a/src/qml/Qt6QmlMacros.cmake b/src/qml/Qt6QmlMacros.cmake index f90c0721f5..59c9c89a93 100644 --- a/src/qml/Qt6QmlMacros.cmake +++ b/src/qml/Qt6QmlMacros.cmake @@ -3233,15 +3233,14 @@ function(qt6_target_qml_sources target) set_property(TARGET ${target} APPEND PROPERTY _qt_qml_module_sanitized_resource_names "${sanitized_resource_name}") - if(extra_qmldirs) + if(extra_qmldirs AND NOT no_extra_qmldirs) list(REMOVE_DUPLICATES extra_qmldirs) __qt_internal_setup_policy(QTP0004 "6.8.0" "You need qmldir files for each extra directory that contains .qml files for your module. \ Check https://doc.qt.io/qt-6/qt-cmake-policy-qtp0004.html for policy details." ) qt6_policy(GET QTP0004 generate_extra_qmldirs_policy) - if ("${generate_extra_qmldirs_policy}" STREQUAL "NEW" - AND NOT no_qmldir AND NOT no_extra_qmldirs) + if ("${generate_extra_qmldirs_policy}" STREQUAL "NEW" AND NOT no_qmldir) foreach(extra_qmldir IN LISTS extra_qmldirs) set(__qt_qmldir_content "prefer :${arg_PREFIX}") configure_file( |
