diff options
Diffstat (limited to 'src/corelib/Qt6CoreMacros.cmake')
-rw-r--r-- | src/corelib/Qt6CoreMacros.cmake | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/corelib/Qt6CoreMacros.cmake b/src/corelib/Qt6CoreMacros.cmake index 223bdd6aac..4b93834ac5 100644 --- a/src/corelib/Qt6CoreMacros.cmake +++ b/src/corelib/Qt6CoreMacros.cmake @@ -1775,6 +1775,14 @@ function(_qt_internal_expose_source_file_to_ide target file) set(ide_target ${target}_other_files) if(NOT TARGET ${ide_target}) add_custom_target(${ide_target} SOURCES "${file}") + + # The new Xcode build system requires a common target to drive the generation of files, + # otherwise project configuration fails. + # By adding ${target} as a dependency of ${target}_other_files, + # it becomes the common target, so project configuration succeeds. + if(CMAKE_GENERATOR STREQUAL "Xcode") + add_dependencies(${ide_target} ${target}) + endif() else() set_property(TARGET ${ide_target} APPEND PROPERTY SOURCES "${file}") endif() |