Move GetCompileDefinitions to cmTarget.
Process COMPILE_DEFINITIONS as generator expressions in QtAutomoc.

Fixes #13493.
Merge topic 'fix-automoc-compile-defs' into next

429e369 Process COMPILE_DEFINITIONS as generator expressions in QtAutomoc.
0e10782 Move GetCompileDefinitions to cmTarget.