summaryrefslogtreecommitdiff
path: root/Modules/FindTclsh.cmake
diff options
context:
space:
mode:
authorAlexander Neundorf <neundorf@kde.org>2007-07-19 09:00:51 -0400
committerAlexander Neundorf <neundorf@kde.org>2007-07-19 09:00:51 -0400
commitc7770b8edbff442267563bd3036cef8fdb0cc4a9 (patch)
tree1c73f377e04981e72043a9ac5fff8fef0eca343b /Modules/FindTclsh.cmake
parentb6b1ebe2950e2437fffd4eecbe3f1992fc63e812 (diff)
downloadcmake-c7770b8edbff442267563bd3036cef8fdb0cc4a9.tar.gz
ENH: use the new FIND_PACKAGE_HANDLE_STANDARD_ARGS() macro in most of the
not-too-complicated modules -remove unnecessary default search paths used in the FIND_XXX() calls Alex
Diffstat (limited to 'Modules/FindTclsh.cmake')
-rw-r--r--Modules/FindTclsh.cmake15
1 files changed, 10 insertions, 5 deletions
diff --git a/Modules/FindTclsh.cmake b/Modules/FindTclsh.cmake
index 4bacc0ffbc..ce358c1490 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 )