FindTCL.cmake 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. #
  2. # This module finds if TCL 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. # TCL_LIB_PATH = the path to where the TCL library is
  7. # TCL_LIBRARY = the name of the tcl library found (tcl tcl80 etc)
  8. # TCL_INCLUDE_PATH = the path to where tcl.h can be found
  9. # TK_LIB_PATH = the path to where the TK library is
  10. # TK_LIBRARY = the name of the tk library found (tk tk80 etc)
  11. # TK_INCLUDE_PATH = the path to where tk.h can be found
  12. #
  13. #
  14. # try to find the Tcl libraries in a few places and names
  15. IF (NOT TCL_LIB_PATH)
  16. FIND_LIBRARY(TCL_LIB_PATH tcl "C:/Program Files/Tcl/lib" /usr/lib /usr/local/lib)
  17. IF (TCL_LIB_PATH)
  18. SET (TCL_LIBRARY tcl CACHE)
  19. ENDIF (TCL_LIB_PATH)
  20. ENDIF (NOT TCL_LIB_PATH)
  21. IF (NOT TCL_LIB_PATH)
  22. FIND_LIBRARY(TCL_LIB_PATH tcl82 "C:/Program Files/Tcl/lib" /usr/lib /usr/local/lib)
  23. IF (TCL_LIB_PATH)
  24. SET (TCL_LIBRARY tcl82 CACHE)
  25. ENDIF (TCL_LIB_PATH)
  26. ENDIF (NOT TCL_LIB_PATH)
  27. IF (NOT TCL_LIB_PATH)
  28. FIND_LIBRARY(TCL_LIB_PATH tcl80 "C:/Program Files/Tcl/lib" /usr/lib /usr/local/lib)
  29. IF (TCL_LIB_PATH)
  30. SET (TCL_LIBRARY tcl80 CACHE)
  31. ENDIF (TCL_LIB_PATH)
  32. ENDIF (NOT TCL_LIB_PATH)
  33. # try to find the Tk libraries in a few places and names
  34. IF (NOT TK_LIB_PATH)
  35. FIND_LIBRARY(TK_LIB_PATH tk "C:/Program Files/Tcl/lib" /usr/lib /usr/local/lib)
  36. IF (TK_LIB_PATH)
  37. SET (TK_LIBRARY tk CACHE)
  38. ENDIF (TK_LIB_PATH)
  39. ENDIF (NOT TK_LIB_PATH)
  40. IF (NOT TK_LIB_PATH)
  41. FIND_LIBRARY(TK_LIB_PATH tk82 "C:/Program Files/Tcl/lib" /usr/lib /usr/local/lib)
  42. IF (TK_LIB_PATH)
  43. SET (TK_LIBRARY tk82 CACHE)
  44. ENDIF (TK_LIB_PATH)
  45. ENDIF (NOT TK_LIB_PATH)
  46. IF (NOT TK_LIB_PATH)
  47. FIND_LIBRARY(TK_LIB_PATH tk80 "C:/Program Files/Tcl/lib" /usr/lib /usr/local/lib)
  48. IF (TK_LIB_PATH)
  49. SET (TK_LIBRARY tk80 CACHE)
  50. ENDIF (TK_LIB_PATH)
  51. ENDIF (NOT TK_LIB_PATH)
  52. # add in the include path
  53. FIND_PATH(TCL_INCLUDE_PATH tcl.h "C:/Program Files/Tcl/include" /usr/include /usr/local/include)
  54. FIND_PATH(TK_INCLUDE_PATH tk.h "C:/Program Files/Tcl/include" /usr/include /usr/local/include)