Move qt_finalize_framework_headers_copy to the scope finalizer

The qt_finalize_framework_headers_copy function uses the module
QT_COPIED_FRAMEWORK_HEADERS property to generate the dependency list
for the ${target}_framework_headers target. In a common case elements
can be added to the QT_COPIED_FRAMEWORK_HEADERS property after the
qt_internal_add_module command call, that's why we need to make sure
that qt_finalize_framework_headers_copy is called after collecting all
headers assigned to the module.

Change-Id: I2878fa6b8d4b11677c3f48345bf6e239221074c2
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 63acb0d9fee6b5d985cd424d2e6283484db057ee)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Alexey Edelev 2021-11-03 10:44:38 +01:00 committed by Qt Cherry-pick Bot
parent 1c8fe484b7
commit 2def195b60

View File

@ -736,10 +736,6 @@ set(QT_LIBINFIX \"${QT_LIBINFIX}\")")
target_link_libraries("${target_private}" INTERFACE "${target}")
endif()
if(is_framework AND NOT is_interface_lib)
qt_finalize_framework_headers_copy(${target})
endif()
set(debug_install_dir "${INSTALL_LIBDIR}")
if (MINGW)
set(debug_install_dir "${INSTALL_BINDIR}")
@ -762,6 +758,7 @@ set(QT_LIBINFIX \"${QT_LIBINFIX}\")")
endfunction()
function(qt_finalize_module target)
qt_finalize_framework_headers_copy(${target})
qt_generate_prl_file(${target} "${INSTALL_LIBDIR}")
qt_generate_module_pri_file("${target}" ${ARGN})
endfunction()