Can I get the system home directory in CMake on Linux? June 13, 2023 by Tarik Home directory is referred to by the HOME environment variable, so you can access it in CMake script by: $ENV{HOME}