diff options
author | Alexey Edelev <alexey.edelev@qt.io> | 2024-01-31 15:58:42 +0100 |
---|---|---|
committer | Alexey Edelev <alexey.edelev@qt.io> | 2024-02-02 08:53:50 +0100 |
commit | b9cff685bfcb3a78583c716140c70faa3edfcf68 (patch) | |
tree | d0eb37073af071e29740b05cd471849dd20bc324 | |
parent | 63ecc3a1f0ede925517bf30470c277c99541804e (diff) |
Use separate property to store implicitly detected QT_QML_ROOT_PATHs
Use _qt_internal_qml_root_path when collecting the qml root paths using
_qt_internal_collect_qml_root_paths. The property is only applicable for
Android builds. This suppresses the QTP0002 warning for the cases when
android application has both QML executable and QML library modules.
Pick-to: 6.6 6.7
Change-Id: I5edff03addb81a8f13ed27347dcc15d44db7b473
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
-rw-r--r-- | src/qml/Qt6AndroidQmlMacros.cmake | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/qml/Qt6AndroidQmlMacros.cmake b/src/qml/Qt6AndroidQmlMacros.cmake index 0463fcf0a5..c9c09b5d76 100644 --- a/src/qml/Qt6AndroidQmlMacros.cmake +++ b/src/qml/Qt6AndroidQmlMacros.cmake @@ -1,10 +1,11 @@ # Copyright (C) 2022 The Qt Company Ltd. # SPDX-License-Identifier: BSD-3-Clause -# The function collects qml root paths and sets the QT_QML_ROOT_PATH property to the ${target} -# based on the provided qml source files. +# The function collects qml root paths and sets the _qt_internal_qml_root_path property to the +# ${target} based on the provided qml source files. _qt_internal_qml_root_path is used on purpose +# to not trigger the the QTP0002 warning without user intention. function(_qt_internal_collect_qml_root_paths target) - get_target_property(qml_root_paths ${target} QT_QML_ROOT_PATH) + get_target_property(qml_root_paths ${target} _qt_internal_qml_root_path) if(NOT qml_root_paths) set(qml_root_paths "") endif() @@ -20,7 +21,7 @@ function(_qt_internal_collect_qml_root_paths target) endforeach() list(REMOVE_DUPLICATES qml_root_paths) - set_target_properties(${target} PROPERTIES QT_QML_ROOT_PATH "${qml_root_paths}") + set_target_properties(${target} PROPERTIES _qt_internal_qml_root_path "${qml_root_paths}") endfunction() # The function extracts the required QML properties from the 'target' and |