CMake does not run moc for a Q_NAMESPACE in a shared library

Well, that was it! If I put ENUMLIB_EXPORTand Q_NAMESPACE in different lines as you suggested, it works fine.
I haven’t opened any issue yet. Is it still necessary?

Thanks a lot, @ben.boeckel!