[CMake] CMake finds the wrong Python interpreter on Windows

Noel O'Boyle baoilleach at gmail.com
Wed Feb 24 04:50:21 EST 2010


Hello all,

With the following CMakeLists.txt on Windows...

project("MyProject" NONE)
find_package(PythonInterp)
find_package(PythonLibs)

Using CMake 2.6.4 (or CMake 2.8), I get

-- Found PythonInterp: C:/Cygwin/bin/python2.5.exe
-- Found PythonLibs: C:/Python26/libs/python26.lib

instead of

-- Found PythonInterp: C:/Python26/python.exe
-- Found PythonLibs: C:/Python26/libs/python26.lib

This is a Windows XP machine, with standard installs of Python 2.5 and
2.6 and a standard Cygwin install of Python 2.5, where my PATH
includes C:\Python26 before C:\Cygwin\bin. Why doesn't CMake just use
the Python interpreter on my path as a first appoximation?

- Noel


More information about the CMake mailing list