From b743323602babb9580149ca2b881ce4bc85e0584 Mon Sep 17 00:00:00 2001 From: Alexey Edelev Date: Tue, 17 Nov 2020 18:46:49 +0100 Subject: CMake: Replace 'file' with 'configure_file' in 'qmldir' generation Collect content of 'qmldir' file that is generated by 'qt6_add_qml_module' and 'qt6_target_qml_files' functions, instead of write content to file immediately. Use 'cmake_language(DEFER CALL)' to call 'configure_file' write whole 'qmldir', when finalizing CMAKE_CURRENT_SOURCE_DIR scope. This way a reconfiguration will not rewrite the files, touch the timestamps, and thus needlessly rebuild. Task-number: QTBUG-88172 Change-Id: Idca68e4ceed13d0aa7eac443e769d5677557b880 Reviewed-by: Alexandru Croitor --- src/qml/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/qml/CMakeLists.txt') diff --git a/src/qml/CMakeLists.txt b/src/qml/CMakeLists.txt index 596a8fdfc0..8e977687cc 100644 --- a/src/qml/CMakeLists.txt +++ b/src/qml/CMakeLists.txt @@ -355,6 +355,8 @@ qt_internal_add_module(Qml Qt::Core PRIVATE_MODULE_INTERFACE Qt::CorePrivate + EXTRA_CMAKE_FILES + "${CMAKE_CURRENT_SOURCE_DIR}/Qt6qmldirTemplate.cmake.in" ) # special case begin remove the block, handled manually -- cgit v1.2.3