cmTarget: copy link libraries from the right properties
This fixes transitive dependencies' usage requirements not appearing when compiling synthetic targets.
See: https://discourse.cmake.org/t/9819
Manual-backport: release-3.28
Backport: release