Skip to content

Windows: Add support for running CMake tools through a symlink

PavelP requested to merge pps83/cmake:realpath-for-FindCMakeResources into master

If cmake.exe was executed through a symbolic link then GetModuleFileNameW will return location of that symbolic link instead of real path of cmake.exe. This results in the following error output: "CMake Error: Could not find CMAKE_ROOT !!! CMake has most likely not been installed correctly."

In my case I don't want to add cmake to PATH env on my PC, I wanted to create a symlink to cmake.exe in some of my tools folder that's added to PATH env, but this didn't work.

Topic-rename: windows-resources-through-link

Edited by Brad King

Merge request reports