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 # TCLSH_FOUND = TRUE if tclsh has been found
6 # TCL_TCLSH = the path to the tclsh executable
7 # In cygwin, look for the cygwin version first. Don't look for it later to
8 # avoid finding the cygwin version on a Win32 build.
11 FIND_PROGRAM(TCL_TCLSH NAMES cygtclsh83 cygtclsh80)
14 GET_FILENAME_COMPONENT(TK_WISH_PATH "${TK_WISH}" PATH)
15 GET_FILENAME_COMPONENT(TK_WISH_PATH_PARENT "${TK_WISH_PATH}" PATH)
17 GET_FILENAME_COMPONENT(TCL_INCLUDE_PATH_PARENT "${TCL_INCLUDE_PATH}" PATH)
18 GET_FILENAME_COMPONENT(TK_INCLUDE_PATH_PARENT "${TK_INCLUDE_PATH}" PATH)
20 GET_FILENAME_COMPONENT(TCL_LIBRARY_PATH "${TCL_LIBRARY}" PATH)
21 GET_FILENAME_COMPONENT(TCL_LIBRARY_PATH_PARENT "${TCL_LIBRARY_PATH}" PATH)
23 GET_FILENAME_COMPONENT(TK_LIBRARY_PATH "${TK_LIBRARY}" PATH)
24 GET_FILENAME_COMPONENT(TK_LIBRARY_PATH_PARENT "${TK_LIBRARY_PATH}" PATH)
26 GET_FILENAME_COMPONENT(
27 ActiveTcl_CurrentVersion
28 "[HKEY_LOCAL_MACHINE\\SOFTWARE\\ActiveState\\ActiveTcl;CurrentVersion]"
31 SET(TCLTK_POSSIBLE_BIN_PATHS
32 "${TCL_INCLUDE_PATH_PARENT}/bin"
33 "${TK_INCLUDE_PATH_PARENT}/bin"
34 "${TCL_LIBRARY_PATH_PARENT}/bin"
35 "${TK_LIBRARY_PATH_PARENT}/bin"
36 "${TK_WISH_PATH_PARENT}/bin"
37 "[HKEY_LOCAL_MACHINE\\SOFTWARE\\ActiveState\\ActiveTcl\\${ActiveTcl_CurrentVersion}]/bin"
38 "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.6;Root]/bin"
39 "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.5;Root]/bin"
40 "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.4;Root]/bin"
41 "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.3;Root]/bin"
42 "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.2;Root]/bin"
43 "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.0;Root]/bin"
46 FIND_PROGRAM(TCL_TCLSH
54 PATHS ${TCLTK_POSSIBLE_BIN_PATHS}
57 # handle the QUIETLY and REQUIRED arguments and set TIFF_FOUND to TRUE if
58 # all listed variables are TRUE
59 INCLUDE(FindPackageHandleStandardArgs)
60 FIND_PACKAGE_HANDLE_STANDARD_ARGS(Tclsh DEFAULT_MSG TCL_TCLSH)
62 MARK_AS_ADVANCED(TCL_TCLSH)