To summarize, the problem was that E
didn't include Qt module neither explicitly:
find_package(Qt4 ...)
nor implicitly:
find_package(MyPrecious ...)
where MyPrecious
could be some 3rd party module which includes Qt by itself.
As a result, non-cached variables like QT_VERSION_*
are not present in the scope of E
subproject, and for that reason AUTOMOC
feature cannot function properly. Nasty pitfall I'd say. For more details refer to CMake mailing list.