[CMake] FIND_* search paths

William A. Hoffman billlist at nycap.rr.com
Wed Jan 4 14:46:39 EST 2006


At 01:59 PM 1/4/2006, Filipe Sousa wrote:


>Sounds great. But what about FIND_PROGRAM? We could have
>CMAKE_SYSTEM_BIN_DIRECTORIES.


I did leave that one out, currently it does:

1. CMAKE_PROGRAM_PATH environment
2. PATH environment ad long as NO_SYSTEM is not passed into the command
3. the user specified paths.


So, this means we also need a cmake variable with PATH in it.

CMAKE_PATH_ENVIRONMENT - This is set to PATH with the correct slashes and ; separated.
CMAKE_SYSTEM_BIN_DIRECTORIES - this is set in the platform files.

So for FIND_* they will all search in this order:

1. The list of paths specified in the call to the command.
   Any of the following could be used in the call:

   CMAKE_PATH_ENVIRONMENT - PATH environment converted to cmake variable
   CMAKE_SYSTEM_BIN_DIRECTORIES - platform specific bin dirs specified in Platform files
   CMAKE_SYSTEM_LIB_DIRECTORIES - platform specific lib dirs specified in Platforma files
   CMAKE_SYSTEM_INCLUDE_DIRECTORIES - platform include dirs

2. CMAKE_*_PATH environment variable

3. PATH environment variable - around for backwards compatibility

4. (for FIND_LIBRARY only) The compiler specific paths that we searched in the past, this
is around only for backwards compatibility in the FIND_LIBRARY command,
and those paths will be duplicated in the CMAKE_SYSTEM_LIB_DIRECTORIES
variable.




More information about the CMake mailing list