[CMake] cmake 32/64 bit

Rolf Eike Beer eike at sf-mail.de
Mon Apr 23 04:59:33 EDT 2012


> Hi everyone,
> I'm using windows 7 (64). I'm trying to determine the python installation
> using cmake.
> The problem is that cmake only exists as a 32 bit application. As a
> consequence, it has only access to the 32 bit registry entries (WOW64). I
> have installed python as a 64 bit application, which is not listed in the
> 32 bit registry.
>
> By accessing
> HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath
>
> in the FinPythonLibs.cmake as the path, the 32 bit cmake does not find a
> python installation. Unfortunately, there is also no possibility to set
> the
> variables (PYTHON_LIBRARY PYTHON_INCUDE_DIR) manually. If I manually add
> in
> the 32 bit registry the 64 bit application (python), everything works,
> though this is just something I did to locate the problem, not a permanent
> solution.
>
> Any ideas how to circumvent these problems? Or is there a way to build a
> 64
> bit cmake?

If you call cmake in the build tree as "cmake -D
PYTHON_LIBRARY=f:/foo/bar/mypython.lib -D
PYTHON_INCLUDE_DIR=f:/foo/bar/include ." this should work.

Eike


More information about the CMake mailing list