[CMake] FindPythonInterp.cmake and FindPythonLibs.cmake Modules Find Different Pythons

digitalriptide digitalriptide at gmail.com
Mon Jul 27 17:13:03 EDT 2015


When I execute FindPythonLibs.cmake and FindPythonInterp.cmake on the
same system, they locate different Python installations. I am running
OS X with cmake 3.2.3. FindPythonLibs picks up the system-provided
python installation, while FindPythonInterp picks up the version of
Python I installed through MacPorts.

Is this the intended behavior? Is there a way to fix this? I don't
really care which version the modules pick up, but it would be nice if
they were internally consistent, as the version mis-match is leading
to subtle bugs. I can hardcode the paths to the desired libraries with
PYTHON_EXECUTABLE and PYTHON_LIBRARY, but that isn't very portable...

Thank you kindly for your advices!


More information about the CMake mailing list