Only use the file(GENERATE) command with new CMake versions.
Merge topic 'target-LOCATION-policy' into next

9282c8f Only use the file(GENERATE) command with new CMake versions.