FindPythonLibs.cmake 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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.2\\InstallPath]/libs/Debug
  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. [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.2\\InstallPath]/libs
  18. [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.1\\InstallPath]/libs
  19. [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.0\\InstallPath]/libs
  20. )
  21. ENDIF(WIN32)
  22. FIND_LIBRARY(PYTHON_LIBRARY
  23. NAMES python python21 python2.1 python20 python2.0 python1.5 python15 python22 python2.2
  24. PATHS
  25. /usr/lib
  26. /usr/lib/python2.2/config
  27. /usr/lib/python2.1/config
  28. /usr/lib/python2.0/config
  29. /usr/lib/python1.5/config
  30. /usr/local/lib
  31. [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.2\\InstallPath]/libs
  32. [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.1\\InstallPath]/libs
  33. [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.0\\InstallPath]/libs
  34. )
  35. FIND_PATH(PYTHON_INCLUDE_PATH Python.h
  36. /usr/include
  37. /usr/include/python2.2
  38. /usr/include/python2.1
  39. /usr/include/python2.0
  40. /usr/include/python1.5
  41. /usr/local/include
  42. [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.2\\InstallPath]/include
  43. [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.1\\InstallPath]/include
  44. [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.0\\InstallPath]/include
  45. )
  46. IF (WIN32)
  47. MARK_AS_ADVANCED(
  48. PYTHON_DEBUG_LIBRARY
  49. PYTHON_LIBRARY
  50. PYTHON_INCLUDE_PATH
  51. )
  52. ENDIF(WIN32)