Qt 5.8 moc generation problem
in Qt 5.8.0 there is a bug considering the generation of moc files. the flags for cmake moc file generation are overridden when msvc is used:
in Qt 5.9.0 this bug is fixed.
if you compare the file of qt 5.8.0 with the one of qt 5.9.0
you can see a very simple fix for this problem. However the online installer does not offer a patched version of qt 5.8 so you have to fix it yourself for now.
the fix for this was implemented in qt on https://codereview.qt-project.org/#/c/184321
so you can compile qt yourself if you want to use 5.8. or try the 5.9 beta builds
Please add a cmake error for Windows when the affected Version is used with an explanation.