FindPythonLibs.cmake 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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. IF(WIN32)
  11. FIND_LIBRARY(PYTHON_DEBUG_LIBRARY
  12. NAMES python python21_d python20_d
  13. PATHS
  14. [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.1\\InstallPath]/libs/Debug
  15. [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.0\\InstallPath]/libs/Debug
  16. [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.1\\InstallPath]/libs
  17. [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.0\\InstallPath]/libs
  18. )
  19. ENDIF(WIN32)
  20. FIND_LIBRARY(PYTHON_LIBRARY
  21. NAMES python python21 python2.1 python20 python2.0
  22. PATHS
  23. /usr/lib
  24. /usr/lib/python2.1/config
  25. /usr/lib/python2.0/config
  26. /usr/local/lib
  27. [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.1\\InstallPath]/libs
  28. [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.0\\InstallPath]/libs
  29. )
  30. FIND_PATH(PYTHON_INCLUDE_PATH Python.h
  31. /usr/include
  32. /usr/include/python2.1
  33. /usr/include/python2.0
  34. /usr/local/include
  35. [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.1\\InstallPath]/include
  36. [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.0\\InstallPath]/include
  37. )