Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

When I build library which uses Qt with cmake I get error "AUTOGEN: error: pluginmanager.cpp: The file contains a Q_OBJECT macro, but does not include pluginmanager.moc"



  • When I build library which uses Qt with cmake I get error

    "AUTOGEN: error: pluginmanager.cpp: The file contains a Q_OBJECT macro, but does not include pluginmanager.moc".

    I have a cmake-project in which I want to reuse some of the QtCreator sources. When I include src/libs/extensionsystem sources cmake tells that error.

    I ask if anyone met this situation when building qt project parts using cmake.



  • The problem have solved.

    cmake autogen cannot properly handle Q_OBJECT if it's in the source code comments. pluginmanager.cpp contains the documentations with code samples that contain "Q_OBJECT" text.

    So I've removed "Q_OBJECT" from comments and autogen worked out.



  • I've submitted the bug on cmake project. http://public.kitware.com/Bug/view.php?id=15751


Log in to reply