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:
6 # TCL_LIBRARY = full path to the Tcl library (tcl tcl80 etc)
7 # TCL_LIBRARY_DEBUG = full path to the Tcl library (debug)
8 # TCL_STUB_LIBRARY = full path to the Tcl stub library
9 # TCL_STUB_LIBRARY_DEBUG = full path to the Tcl stub library (debug)
10 # TCL_INCLUDE_PATH = path to where tcl.h can be found
11 # TCL_TCLSH = full path to the tclsh binary (tcl tcl80 etc)
12 # TK_LIBRARY = full path to the Tk library (tk tk80 etc)
13 # TK_LIBRARY_DEBUG = full path to the Tk library (debug)
14 # TK_STUB_LIBRARY = full path to the Tk stub library
15 # TK_STUB_LIBRARY_DEBUG = full path to the Tk stub library (debug)
16 # TK_INCLUDE_PATH = path to where tk.h can be found
17 # TK_INTERNAL_PATH = path to where tkWinInt.h can be found
18 # TK_WISH = full path to the wish binary (wish wish80 etc)
21 INCLUDE(${CMAKE_ROOT}/Modules/FindTclsh.cmake)
22 INCLUDE(${CMAKE_ROOT}/Modules/FindWish.cmake)
24 GET_FILENAME_COMPONENT(TCL_TCLSH_PATH ${TCL_TCLSH} PATH)
26 GET_FILENAME_COMPONENT(TK_WISH_PATH ${TK_WISH} PATH)
28 SET (TCLTK_POSSIBLE_LIB_PATHS
31 "C:/Program Files/Tcl/lib"
33 [HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.4;Root]/lib
34 [HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.3;Root]/lib
35 [HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.2;Root]/lib
36 [HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.0;Root]/lib
37 "${TCL_TCLSH_PATH}/../lib"
38 "${TK_WISH_PATH}/../lib"
41 FIND_LIBRARY(TCL_LIBRARY
42 NAMES tcl tcl84 tcl8.4 tcl83 tcl8.3 tcl82 tcl8.2 tcl80 tcl8.0
43 PATHS ${TCLTK_POSSIBLE_LIB_PATHS}
46 FIND_LIBRARY(TCL_LIBRARY_DEBUG
47 NAMES tcld tcl84d tcl8.4d tcl83d tcl8.3d tcl82d tcl8.2d tcl80d tcl8.0d
48 PATHS ${TCLTK_POSSIBLE_LIB_PATHS}
51 FIND_LIBRARY(TCL_STUB_LIBRARY
52 NAMES tclstub tclstub84 tclstub8.4 tclstub83 tclstub8.3 tclstub82 tclstub8.2 tclstub80 tclstub8.0
53 PATHS ${TCLTK_POSSIBLE_LIB_PATHS}
56 FIND_LIBRARY(TCL_STUB_LIBRARY_DEBUG
57 NAMES tclstubd tclstub84d tclstub8.4d tclstub83d tclstub8.3d tclstub82d tclstub8.2d tclstub80d tclstub8.0d
58 PATHS ${TCLTK_POSSIBLE_LIB_PATHS}
61 FIND_LIBRARY(TK_LIBRARY
62 NAMES tk tk84 tk8.4 tk83 tk8.3 tk82 tk8.2 tk80 tk8.0
63 PATHS ${TCLTK_POSSIBLE_LIB_PATHS}
66 FIND_LIBRARY(TK_LIBRARY_DEBUG
67 NAMES tkd tk84d tk8.4d tk83d tk8.3d tk82d tk8.2d tk80d tk8.0d
68 PATHS ${TCLTK_POSSIBLE_LIB_PATHS}
71 FIND_LIBRARY(TK_STUB_LIBRARY
72 NAMES tkstub tkstub84 tkstub8.4 tkstub83 tkstub8.3 tkstub82 tkstub8.2 tkstub80 tkstub8.0
73 PATHS ${TCLTK_POSSIBLE_LIB_PATHS}
76 FIND_LIBRARY(TK_STUB_LIBRARY_DEBUG
77 NAMES tkstubd tkstub84d tkstub8.4d tkstub83d tkstub8.3d tkstub82d tkstub8.2d tkstub80d tkstub8.0d
78 PATHS ${TCLTK_POSSIBLE_LIB_PATHS}
81 SET (TCLTK_POSSIBLE_INCLUDE_PATHS
88 "C:/Program Files/Tcl/include"
90 [HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.4;Root]/include
91 [HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.3;Root]/include
92 [HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.2;Root]/include
93 [HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.0;Root]/include
94 "${TCL_TCLSH_PATH}/../include"
95 "${TK_WISH_PATH}/../include"
98 FIND_PATH(TCL_INCLUDE_PATH tcl.h
99 ${TCLTK_POSSIBLE_INCLUDE_PATHS}
102 FIND_PATH(TK_INCLUDE_PATH tk.h
103 ${TCLTK_POSSIBLE_INCLUDE_PATHS}
107 FIND_PATH(TK_INTERNAL_PATH tkWinInt.h
108 ${TCLTK_POSSIBLE_INCLUDE_PATHS}
110 MARK_AS_ADVANCED(TK_INTERNAL_PATH)
120 TCL_STUB_LIBRARY_DEBUG
124 TK_STUB_LIBRARY_DEBUG