[CMake] More refactoring of symlink creation.