cmGeneratorTarget: add method to get a filesystem-safe export name
C++ module support puts the export name in a filename. Export names with
:
in them are not valid filenames on Windows. Add a method to escape
names as necessary.
Fixes: #25828 (closed)
Backport: release
Manual-backport: release-3.28
Edited by Brad King