diff options
author | Alexander Neundorf <neundorf@kde.org> | 2007-07-19 17:40:23 (GMT) |
---|---|---|
committer | Alexander Neundorf <neundorf@kde.org> | 2007-07-19 17:40:23 (GMT) |
commit | 0f4985ea2394ef65f37c23f39f65168ad668b03b (patch) | |
tree | a4b13cad6af2094bfd26642df7f55dd395b70e0a /Modules/FindTCL.cmake | |
parent | 3907d594450c68e6392f2caaa95126e4c62075c0 (diff) | |
download | CMake-0f4985ea2394ef65f37c23f39f65168ad668b03b.zip CMake-0f4985ea2394ef65f37c23f39f65168ad668b03b.tar.gz CMake-0f4985ea2394ef65f37c23f39f65168ad668b03b.tar.bz2 |
ENH: add TK_FOUND and TCLTK_FOUND
TCL_FOUND is now TRUE if Tcl was found, before it was only TRUE if Tcl and
Tk were found
Alex
Diffstat (limited to 'Modules/FindTCL.cmake')
-rw-r--r-- | Modules/FindTCL.cmake | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/Modules/FindTCL.cmake b/Modules/FindTCL.cmake index 2099e27..bc4f4f2 100644 --- a/Modules/FindTCL.cmake +++ b/Modules/FindTCL.cmake @@ -2,6 +2,9 @@ # 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: +# TCL_FOUND = Tcl was found +# TK_FOUND = Tk was found +# TCLTK_FOUND = Tcl and Tk were found # TCL_LIBRARY = path to Tcl library (tcl tcl80) # TCL_LIBRARY_DEBUG = path to Tcl library (debug) # TCL_STUB_LIBRARY = path to Tcl stub library @@ -139,6 +142,19 @@ IF (WIN32) MARK_AS_ADVANCED(TK_INTERNAL_PATH) ENDIF(WIN32) +# 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(TCL TCL_LIBRARY TCL_INCLUDE_PATH) +SET(TCLTK_FIND_REQUIRED ${TCL_FIND_REQUIRED}) +SET(TCLTK_FIND_QUIETLY ${TCL_FIND_QUIETLY}) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(TCLTK TCL_LIBRARY TCL_INCLUDE_PATH TK_LIBRARY TK_INCLUDE_PATH) +SET(TK_FIND_REQUIRED ${TCL_FIND_REQUIRED}) +SET(TK_FIND_QUIETLY ${TCL_FIND_QUIETLY}) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(TK TK_LIBRARY TK_INCLUDE_PATH) + + MARK_AS_ADVANCED( TCL_TCLSH_PATH TK_WISH_PATH @@ -154,13 +170,4 @@ MARK_AS_ADVANCED( TK_STUB_LIBRARY TK_STUB_LIBRARY_DEBUG ) - -IF(TCL_INCLUDE_PATH) - IF(TK_INCLUDE_PATH) - IF(TCL_LIBRARY) - IF(TK_LIBRARY) - SET(TCL_FOUND 1) - ENDIF(TK_LIBRARY) - ENDIF(TCL_LIBRARY) - ENDIF(TK_INCLUDE_PATH) -ENDIF(TCL_INCLUDE_PATH) + |