diff options
Diffstat (limited to 'Modules/FindTclsh.cmake')
-rw-r--r-- | Modules/FindTclsh.cmake | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/Modules/FindTclsh.cmake b/Modules/FindTclsh.cmake index 4bacc0f..ce358c1 100644 --- a/Modules/FindTclsh.cmake +++ b/Modules/FindTclsh.cmake @@ -2,14 +2,14 @@ # This module finds if TCL is installed and determines where the # include files and libraries are. It also determines what the name of # the library is. This code sets the following variables: +# TCLSH_FOUND = TRUE if tclsh has been found # TCL_TCLSH = the path to the tclsh executable # In cygwin, look for the cygwin version first. Don't look for it later to # avoid finding the cygwin version on a Win32 build. -IF(WIN32) - IF(UNIX) - FIND_PROGRAM(TCL_TCLSH NAMES cygtclsh83 cygtclsh80) - ENDIF(UNIX) -ENDIF(WIN32) + +IF(WIN32 AND UNIX) + FIND_PROGRAM(TCL_TCLSH NAMES cygtclsh83 cygtclsh80) +ENDIF(WIN32 AND UNIX) GET_FILENAME_COMPONENT(TCL_LIBRARY_PATH "${TCL_LIBRARY}" PATH) GET_FILENAME_COMPONENT(TK_LIBRARY_PATH "${TK_LIBRARY}" PATH) @@ -32,4 +32,9 @@ FIND_PROGRAM(TCL_TCLSH [HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.0;Root]/bin ) +# handle the QUIETLY and REQUIRED arguments and set TIFF_FOUND to TRUE if +# all listed variables are TRUE +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(Tclsh TCL_TCLSH) + MARK_AS_ADVANCED( TCL_TCLSH ) |