[CMake] Default search paths for FIND_PATH

Gonzalo Garramuño ggarra at advancedsl.com.ar
Mon Nov 19 09:54:31 EST 2007


Stephen Collyer wrote:
> 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. 
> 

Blame windows localization for that.

%ProgramFiles% is a windows built-in environment variable.  Its value 
varies depending on your Windows native language and version, but I 
believe it is set in the Configuration->System->Advance 
Options->Environment Variables (System/All users section).  The value is 
set upon installation of windows.

In English, it is usually C:\Program Files.  In Spanish, it may be 
C:\Archivos de Programa.  Etc.

It is often a problematic variable for build systems (and installers) 
due to the built-in space(s) in its path, albeit cmake should be able to 
work around that issue.


-- 
Gonzalo Garramuño
ggarra at advancedsl.com.ar

AMD4400 - ASUS48N-E
GeForce7300GT
Kubuntu Edgy


More information about the CMake mailing list