KDAB / Charm

The Cross-Platform Time Tracker
GNU General Public License v2.0
192 stars 70 forks source link

CMake: Use CMAKE_AUTOUIC #362

Closed KyleFromKitware closed 3 years ago

KyleFromKitware commented 3 years ago

CMake 3.20 changed the behavior of AUTOMOC in a subtle way (https://gitlab.kitware.com/cmake/cmake/-/issues/21977) which revealed a circular dependency between the autogen target and the files generated by qt5_wrap_ui(). The circular dependency always existed, but did not appear until CMake 3.20 due to a bug in Ninja (https://github.com/ninja-build/ninja/issues/1251).

Resolve this issue by using AUTOUIC as well as AUTOMOC, and not combining the CMake AUTOMOC approach with the Qt qt5_wrap_ui() approach.

KyleFromKitware commented 3 years ago

KDECMakeSettings.cmake appears to be from another repository. Should I submit a pull request to that repository, or should I move the CMAKE_AUTOUIC setting somewhere else, or is a local modification fine?

KyleFromKitware commented 3 years ago

Closing in favor of fixing the issue on CMake's end.