Cmake 3.24 sanity check breaks building Qt6 Designer
Trying to build Qt6 Designer 6.4.0-beta2 from http://download.qt-project.org/development_releases/qt/6.4/6.4.0-beta2/submodules/qttools-everywhere-src-6.4.0-beta2.tar.xz with cmake 3.24-rc4 fails while configuring the build:
CMake Error in src/designer/src/lib/CMakeLists.txt: More than one .ui file with the name Dialog_with_Buttons_Bottom.ui was found in the sources for target Designer.
CMake Error in src/designer/src/lib/CMakeLists.txt: More than one .ui file with the name Dialog_with_Buttons_Right.ui was found in the sources for target Designer.
CMake Error in src/designer/src/lib/CMakeLists.txt: More than one .ui file with the name Dialog_with_Buttons_Bottom.ui was found in the sources for target Designer.
CMake Error in src/designer/src/lib/CMakeLists.txt: More than one .ui file with the name Dialog_with_Buttons_Right.ui was found in the sources for target Designer.
CMake Error in src/designer/src/lib/CMakeLists.txt: More than one .ui file with the name Dialog_with_Buttons_Bottom.ui was found in the sources for target Designer.
CMake Error in src/designer/src/lib/CMakeLists.txt: More than one .ui file with the name Dialog_with_Buttons_Right.ui was found in the sources for target Designer.
CMake Error in src/designer/src/lib/CMakeLists.txt: More than one .ui file with the name Dialog_with_Buttons_Bottom.ui was found in the sources for target Designer.
CMake Error in src/designer/src/lib/CMakeLists.txt: More than one .ui file with the name Dialog_with_Buttons_Right.ui was found in the sources for target Designer.
The problem seems to be a sanity check making sure a project can't include clashing .ui files in its sources (cmake-3.24.0-rc4/Source/cmQtAutoGenInitializer.cxx around line 960) -- In this particular case, it seems to be intentional since the .ui files are part of a qrc rather than sources being compiled in the project itself.