summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/NinjaMultiConfig/Qt5.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/RunCMake/NinjaMultiConfig/Qt5.cmake')
-rw-r--r--Tests/RunCMake/NinjaMultiConfig/Qt5.cmake12
1 files changed, 12 insertions, 0 deletions
diff --git a/Tests/RunCMake/NinjaMultiConfig/Qt5.cmake b/Tests/RunCMake/NinjaMultiConfig/Qt5.cmake
index 6a80b1d..3a1c7f5 100644
--- a/Tests/RunCMake/NinjaMultiConfig/Qt5.cmake
+++ b/Tests/RunCMake/NinjaMultiConfig/Qt5.cmake
@@ -11,8 +11,20 @@ target_link_libraries(exe PRIVATE Qt5::Core)
include(${CMAKE_CURRENT_LIST_DIR}/Common.cmake)
generate_output_files(exe)
+set(moc_writes_depfiles 0)
+if(Qt5Core_VERSION VERSION_GREATER_EQUAL "5.15.0")
+ set(moc_writes_depfiles 1)
+endif()
+
set(autogen_files "${CMAKE_BINARY_DIR}/exe_autogen/mocs_compilation.cpp")
+if(moc_writes_depfiles)
+ list(APPEND autogen_files "${CMAKE_BINARY_DIR}/exe_autogen/deps")
+ list(APPEND autogen_files "${CMAKE_BINARY_DIR}/exe_autogen/timestamp")
+endif()
foreach(c IN LISTS CMAKE_CONFIGURATION_TYPES)
list(APPEND autogen_files "${CMAKE_BINARY_DIR}/exe_autogen/include_${c}/moc_qt5.cpp")
+ if(moc_writes_depfiles)
+ list(APPEND autogen_files "${CMAKE_BINARY_DIR}/exe_autogen/include_${c}/moc_qt5.cpp.d")
+ endif()
endforeach()
file(APPEND "${CMAKE_BINARY_DIR}/target_files.cmake" "set(AUTOGEN_FILES [==[${autogen_files}]==])\n")