STYLE: Nightly Version update
[cmake.git] / Modules / FindTclsh.cmake
blobdec264b64c2cd1bcbabea92fd0dae5d21e766815
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_TCLSH        = the full path to the tclsh binary (tcl tcl80 etc)
9 # In cygwin, look for the cygwin version first.  Don't look for it later to
10 # avoid finding the cygwin version on a Win32 build.
11 IF(WIN32)
12   IF(UNIX)
13     FIND_PROGRAM(TCL_TCLSH NAMES cygtclsh83 cygtclsh80)
14   ENDIF(UNIX)
15 ENDIF(WIN32)
17 GET_FILENAME_COMPONENT(TCL_LIBRARY_PATH "${TCL_LIBRARY}" PATH)
18 GET_FILENAME_COMPONENT(TK_LIBRARY_PATH "${TK_LIBRARY}" PATH)
20 FIND_PROGRAM(TCL_TCLSH
21   NAMES tclsh
22   tclsh84 tclsh8.4
23   tclsh83 tclsh8.3
24   tclsh82 tclsh8.2
25   tclsh80 tclsh8.0
26   PATHS
27   "${TCL_INCLUDE_PATH}/../bin"
28   "${TK_INCLUDE_PATH}/../bin"
29   "${TCL_LIBRARY_PATH}/../bin"
30   "${TK_LIBRARY_PATH}/../bin"
31   [HKEY_LOCAL_MACHINE\\SOFTWARE\\ActiveState\\ActiveTcl\\8.4.6.0]/bin
32   [HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.4;Root]/bin
33   [HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.3;Root]/bin
34   [HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.2;Root]/bin
35   [HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.0;Root]/bin
38 IF (WIN32)
39   MARK_AS_ADVANCED(
40     TCL_TCLSH
41     )
42 ENDIF(WIN32)