From ab6950acab5f799e5b3f097a87300e7c1dd1cf04 Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Thu, 25 Jan 2024 09:45:23 +0100 Subject: [PATCH] CMake: Fix *-metatypes.json creation for non-Ninja generators This amends commit db9009721a11f482b601a228eb6d0e1658d997b0, which fixed the *-metatypes.json creation for Makefile generators. User feedback and the comments in the underlying CMake issue #19005 suggest that all non-Ninja generators are affected. Fix this by activating the work-around for all non-Ninja generators. Pick-to: 6.6 6.5 Fixes: QTBUG-120317 Change-Id: I537ff7be9c658b7053f7f5df6cbced460be43270 Reviewed-by: Alexandru Croitor Reviewed-by: Alexey Edelev (cherry picked from commit 3a4397af2e5076a3425e92d8bbeae37b4267c389) Reviewed-by: Qt Cherry-pick Bot --- src/corelib/Qt6CoreMacros.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/Qt6CoreMacros.cmake b/src/corelib/Qt6CoreMacros.cmake index 868461dacab..dd9be21330d 100644 --- a/src/corelib/Qt6CoreMacros.cmake +++ b/src/corelib/Qt6CoreMacros.cmake @@ -1371,7 +1371,7 @@ function(qt6_extract_metatypes target) VERBATIM ) - if(CMAKE_GENERATOR MATCHES " Makefiles") + if(NOT CMAKE_GENERATOR MATCHES "^Ninja") # Work around https://gitlab.kitware.com/cmake/cmake/-/issues/19005 to trigger the command # that generates ${metatypes_file}. add_custom_command(