aboutsummaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorAmir Masoud Abdol <amirmasoudabdol@icloud.com>2022-10-21 11:20:47 +0200
committerAmir Masoud Abdol <amirmasoudabdol@icloud.com>2022-10-26 14:02:58 +0200
commit64de90a97717ff04b8de7c069e8ce22f18e51641 (patch)
treee0d31bf6934883104188c604d68b596e16aa0737 /cmake
parent0ddd032ffca22669e0da23bc4881f041376b1d90 (diff)
Make Sure that `qml_compile_hash_p.h` Isn't Missing
In the event of an unexpected build directory corruption, CMake may fail to replace/install the `qml_compiler_hash_p.h` properly. I have had similar errors with other files missing as well, so this fix might be applicable to elsewhere as well. Pick-to: 6.4 Change-Id: Ife3e28a09296b5428d0f0248648caabda601c94d Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/QtDeclarativeSetup.cmake2
1 files changed, 2 insertions, 0 deletions
diff --git a/cmake/QtDeclarativeSetup.cmake b/cmake/QtDeclarativeSetup.cmake
index 6559b7b4c8..6f39befa26 100644
--- a/cmake/QtDeclarativeSetup.cmake
+++ b/cmake/QtDeclarativeSetup.cmake
@@ -10,6 +10,8 @@
function(qt_declarative_write_tag_header target_name)
set(out_file "${CMAKE_CURRENT_BINARY_DIR}/qml_compile_hash_p.h")
if(FEATURE_developer_build AND EXISTS "${out_file}")
+ target_sources(${target_name} PRIVATE "${out_file}")
+ set_source_files_properties("${out_file}" PROPERTIES GENERATED TRUE)
return()
endif()