CMake does not invoke moc in some cases
I have a header file that contains something like:
#include <QObject>
namespace n {
Q_NAMESPACE
enum e { a, b, c, d };
Q_ENUM_NS(e)
}
MOC is not invoked in case of processing this file. If I add QObject
declaration in the file, ex:
...
#ifdef Q_MOC_RUN
class T : public QObject {
Q_OBJECT
};
#endif
Then MOC is invoked properly. It seems to be not a Qt MOC problem because manual MOC invokation generates needed data for both cases.