CMake: Reconfigure whenever module EXTRA_FILES are touched

Otherwise the touched files will not be re-copied and re-installed
until an explicit rerun of cmake.

Pick-to: 6.7
Change-Id: I5abb752b45d8b33885a59363fe987225a89e713a
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
This commit is contained in:
Alexandru Croitor 2024-03-20 11:51:50 +01:00
parent 2499de8874
commit 07e7340c0d

View File

@ -729,6 +729,9 @@ set(QT_ALLOW_MISSING_TOOLS_PACKAGES TRUE)")
get_filename_component(basename ${cmake_file} NAME)
file(COPY ${cmake_file} DESTINATION ${config_build_dir})
list(APPEND extra_cmake_files "${config_build_dir}/${basename}")
# Make sure touched extra cmake files cause a reconfigure, so they get re-copied.
set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS "${cmake_file}")
endforeach()
list(APPEND extra_cmake_includes ${arg_EXTRA_CMAKE_INCLUDES})