CMake: Fix *-metatypes.json creation for non-Ninja generators

This amends commit db9009721a, 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.5 6.6 6.7
Fixes: QTBUG-120317
Change-Id: I537ff7be9c658b7053f7f5df6cbced460be43270
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
bb10
Joerg Bornemann 2024-01-25 09:45:23 +01:00
parent 49902cc6ce
commit 3a4397af2e
1 changed files with 1 additions and 1 deletions

View File

@ -1425,7 +1425,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(