[Cmake] Modules/FindPythonLibs.cmake

Ken Martin ken.martin at kitware.com
Fri May 11 11:06:59 EDT 2001


Hello Folk,

I have added registry support to the FIND_LIBRARY, FIND_PATH and
FIND_PROGRAM commands. See below ...

> Seems to me that Ken has committed a FindPythonLibs.cmake
> module (shouldn't
> it be named FindPython.cmake instead ?)

It could be if it also found the python executable. I've been keeping
the searches for runtime programs separate from the development
support. So that someone who needs to run Python wouldn't necc. get
CMake variables for all the libraries/includes etc. It seems that many
builds need to use tools like Python as part of the build process but
aren't actually compiling against python. I'm trying to isolate those
users from seeing all the other values.

>
> Is it just a reminder for I've said about the Python
> registry keys to use,
> or is someone really working on that registry issue ?
>
> FIND_LIBRARY(PYTHON_LIBRARY python python21 python20
>    PATHS
>    /usr/lib
>    /usr/local/lib
>
> [HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\2.1\InstallPath]/libs
>
> [HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\2.0\InstallPath]/libs
> )
>

It is implemented and at least slightly tested.

> Do you plan to rely on the [] around the key, or do we need
> a REGISTRY
> parameter  like :
>
> FIND_LIBRARY(PYTHON_LIBRARY python python21 python20
>    PATHS
>    /usr/lib
>    /usr/local/lib
>   REGISTRY
>
> [HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\2.1\InstallPath]/libs
>
> [HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\2.0\InstallPath]/libs
> )
>

The regexp is \[(HKEY[A-Za-z_0-9\.\\]*)\] so I'm basically looking for
[HKEY I don't think there is any need for a special word.

Ken





More information about the CMake mailing list