FindPythonLibs.cmake 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  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 python2.1 python20 python2.0
  20. PATHS
  21. /usr/lib
  22. /usr/lib/python2.1/config
  23. /usr/lib/python2.0/config
  24. /usr/local/lib
  25. [HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\2.1\InstallPath]/libs
  26. [HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\2.0\InstallPath]/libs
  27. )
  28. FIND_PATH(PYTHON_INCLUDE_PATH Python.h
  29. /usr/include
  30. /usr/include/python2.1
  31. /usr/include/python2.0
  32. /usr/local/include
  33. [HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\2.1\InstallPath]/include
  34. [HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\2.0\InstallPath]/include
  35. )