AUTOMOC: OBJECT libraries not propogating moc object files in CMake 3.20
I am using Qt to build an OBJECT library used by two executables. The OBJECT library has the AUTOMOC property set to 'TRUE' and correctly builds the object files of the appropriate moc sources files. However, when the OBJECT library is linked by the desired executable, the OBJECT library is not propagating the moc object files to the targets and the linking stage generates a linker error associated with the missing
moc_<src> object files.
This feature worked in cmake 3.19.
I've attached code to demonstrate the problem.