CMake: Fix qt6_wrap_cpp's __QT_INTERNAL_OUTPUT_MOC_JSON_FILES option

This output parameter was not forwarded from _qt_internal_wrap_cpp.
This amends commit f3d29dfb89f3e35623edd7e5bca934a1e85a6c35.

Fixes: QTBUG-127799
Change-Id: I4a17961d220b556c8d85503de9bd3129713a4474
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Matthias Rauter <matthias.rauter@qt.io>
Reviewed-by: Orkun Tokdemir <orkun.tokdemir@qt.io>
(cherry picked from commit 987c6d2d75429444f866bd17ccc24227198b090f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
bb10
Joerg Bornemann 2024-08-08 10:58:52 +02:00 committed by Qt Cherry-pick Bot
parent adf619ce0e
commit 9ff399fd09
1 changed files with 12 additions and 0 deletions

View File

@ -191,6 +191,18 @@ function(qt6_wrap_cpp)
_qt_internal_wrap_cpp(${ARGV})
set(${output_parameter} "${${output_parameter}}" PARENT_SCOPE)
endif()
# Forward further return values of _qt_internal_wrap_cpp to the caller.
set(no_value_options "")
set(single_value_options __QT_INTERNAL_OUTPUT_MOC_JSON_FILES)
set(multi_value_options "")
cmake_parse_arguments(arg
"${no_value_options}" "${single_value_options}" "${multi_value_options}" ${ARGV}
)
if(NOT "${arg___QT_INTERNAL_OUTPUT_MOC_JSON_FILES}" STREQUAL "")
set(${arg___QT_INTERNAL_OUTPUT_MOC_JSON_FILES}
"${${arg___QT_INTERNAL_OUTPUT_MOC_JSON_FILES}}" PARENT_SCOPE)
endif()
endfunction()
# _qt_internal_wrap_cpp(outfiles inputfile ... )