CMake real path

CMake does pure lexical file path operations via cmake_path, including normalizing paths. To resolve symlinks and expand “~” tilde to home directory, use file(REAL_PATH).

This example shows the distinct behavior versus get_filename_component(REALPATH), including on case-insensitive filesystems such as macOS and Windows.