cmake: Add -E copy_directory_if_different

Fixes #21584
4 files changed