0

I have a CMake file which builds a QT project. It looks like:

...
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
find_package(Qt5Widget)
...

However, after cmake this file, no moc_* files generated. Where did I got wrong?

C. Wang
  • 2,516
  • 5
  • 29
  • 46
  • This is not answer, but I hope it helps, you can play with [complete successful example](http://stackoverflow.com/questions/25989448/implementing-qt-project-through-cmake/25990278#25990278). – Gluttton Sep 08 '15 at 11:23
  • Did you forgot the Q_OBJECT macro in your class declaration? Only source files containing any from QObject (or similar) derived classes which have the Q_OBJECT macro generate moc files. – Gombat Sep 08 '15 at 12:38

0 Answers0