aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/Qt6QmlBuildInternals.cmake
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2022-01-18 11:16:39 +0100
committerAlexandru Croitor <alexandru.croitor@qt.io>2022-01-20 19:33:01 +0100
commit65e4c76b9fa128aa372e34a3e663950636d6cdb6 (patch)
tree515fd1e7447749f9e19e122b6988c83f66a1f9fe /src/qml/Qt6QmlBuildInternals.cmake
parent3027d8ed74705cd0dd43009acdb6f354d430d5ba (diff)
CMake: Pass C++ sources to pre-created qml module targets
Previously they were silently discarded. Pick-to: 6.2 6.3 Change-Id: I3ab4d050ea4649dec7e53f27c8044037bb49cddc Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Diffstat (limited to 'src/qml/Qt6QmlBuildInternals.cmake')
-rw-r--r--src/qml/Qt6QmlBuildInternals.cmake3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/qml/Qt6QmlBuildInternals.cmake b/src/qml/Qt6QmlBuildInternals.cmake
index 13cc64cad7..445de26cef 100644
--- a/src/qml/Qt6QmlBuildInternals.cmake
+++ b/src/qml/Qt6QmlBuildInternals.cmake
@@ -170,6 +170,9 @@ function(qt_internal_add_qml_module target)
${ARGN}
)
qt_internal_add_module(${target} ${module_args})
+ elseif(arg_SOURCES)
+ # If a module target was pre-created, we still need to pass the additional sources.
+ target_sources(${target} PRIVATE ${arg_SOURCES})
endif()
else()
# Since we are not creating a separate backing target, we have to pass