Problem with CMAKE_AUTOUIC

Thanks. With Qt6_Qt5.zip and VS 16.8 I get

gui\MainWindow.h(4,10): fatal error C1083: Cannot open include file: 'ui_MainWindow.h'

Please strip your example down further to avoid the Qt6/Qt5 switch (use Qt5 only), remove unnecessary Qt components, and remove subdirectories if possible. Then open an issue and attach the example.