Skip to content

Commit

Permalink
CMake: Fix *-metatypes.json creation for non-Ninja generators
Browse files Browse the repository at this point in the history
This amends commit db90097, 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 <alexandru.croitor@qt.io>
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 3a4397a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
  • Loading branch information
jobor authored and Qt Cherry-pick Bot committed Jan 26, 2024
1 parent 8ec7b80 commit ab6950a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/corelib/Qt6CoreMacros.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit ab6950a

Please sign in to comment.