FindPythonLibs.cmake 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. #
  2. # This module finds if Python is installed and determines where the
  3. # include files and libraries are. It also determines what the name of
  4. # the library is. This code sets the following variables:
  5. #
  6. # PYTHON_LIBRARY = the full path to the library found
  7. # PYTHON_INCLUDE_PATH = the path to where tcl.h can be found
  8. # PYTHON_DEBUG_LIBRARY = the full path to the debug library found
  9. #
  10. FIND_LIBRARY(PYTHON_DEBUG_LIBRARY
  11. NAMES python python21_d python20_d
  12. PATHS
  13. /usr/lib
  14. /usr/local/lib
  15. [HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\2.1\InstallPath]/libs/Debug
  16. [HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\2.0\InstallPath]/libs/Debug
  17. )
  18. FIND_LIBRARY(PYTHON_LIBRARY
  19. NAMES python python21 python20
  20. PATHS
  21. /usr/lib
  22. /usr/local/lib
  23. [HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\2.1\InstallPath]/libs
  24. [HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\2.0\InstallPath]/libs
  25. )
  26. FIND_PATH(PYTHON_INCLUDE_PATH Python.h
  27. /usr/include
  28. /usr/local/include
  29. [HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\2.1\InstallPath]/include
  30. [HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\2.0\InstallPath]/include
  31. )