From 65e4c76b9fa128aa372e34a3e663950636d6cdb6 Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Tue, 18 Jan 2022 11:16:39 +0100 Subject: 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 --- src/qml/Qt6QmlBuildInternals.cmake | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/qml/Qt6QmlBuildInternals.cmake') 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 -- cgit v1.2.3