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

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

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