[CMake] Default search paths for FIND_PATH
Hendrik Sattler
post at hendrik-sattler.de
Mon Nov 19 09:47:25 EST 2007
Zitat von Stephen Collyer <scollyer at netspinner.co.uk>:
> Alexander Neundorf wrote:
>
>> The defaults are set in Modules/Platform/UnixPath.cmake and
>> WindowsPaths.cmake
>
> Thanks for that. There's one thing I don't understand: in
> UnixPath.cmake, the search paths are set to a set of hard-coded
> absolute paths, as I would expect. However, in WindowsPaths.cmake,
> the search paths are set to the value of $ENV{ProgramFiles} which
> I assume is the value of that environment variable. It's not clear
> to me where $ENV{ProgramFiles} itself is set though - it's not an
> environment variable that I have set in my Windows session. Do you
> know where it comes from ?
Start->Run...: "cmd"
and type "set" there.
ProgramFiles is a variable defined by Windows itself. On Windows XP,
it points to "C:\Program Files" or a translated version (e.g.
"C:\Programme" in the German Windows version). On Vista, is is always
the english one (obviously they realized the downsides of the first
approach).
HS
More information about the CMake
mailing list