aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2022-09-22 17:55:02 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2022-09-24 14:26:18 +0000
commit15c54416b12a6ce9fddccf59c1ad92fb4ba9e7a7 (patch)
tree8cea91bb4f961901975d2c423f5f6cce826e092c /src/qml
parent5d92fe24dace994986b3dee38c6a52569a99e744 (diff)
CMake: Pass --private-includes to qmltyperegistrar for *Private targets
If the QML module is attached to the private target itself we want to generate 'private/' file names, too. So far we only do that when the QML module was attached to a public target that had a corresponding private target. Fixes: QTBUG-106887 Change-Id: I729ce39f362b7bdae02e4d737a3fc79e25c02ac1 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> (cherry picked from commit a5a7407b6bfa0ab07cc031740726dcc9fc234e72) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src/qml')
-rw-r--r--src/qml/Qt6QmlMacros.cmake5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/qml/Qt6QmlMacros.cmake b/src/qml/Qt6QmlMacros.cmake
index d26f183f5d..b2dede3054 100644
--- a/src/qml/Qt6QmlMacros.cmake
+++ b/src/qml/Qt6QmlMacros.cmake
@@ -1810,6 +1810,11 @@ function(_qt_internal_qml_type_registration target)
if (TARGET ${target}Private)
list(APPEND cmd_args --private-includes)
+ else()
+ string(REGEX MATCH "Private$" privateSuffix ${target})
+ if (privateSuffix)
+ list(APPEND cmd_args --private-includes)
+ endif()
endif()
get_target_property(target_metatypes_json_file ${target} INTERFACE_QT_META_TYPES_BUILD_FILE)