Use cmake -E copy_directory instead of cp -r