diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2001-05-09 18:53:32 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2001-05-09 18:53:32 (GMT) |
commit | f07ee5b8177e9e08f290e3acdff6c31d6b694bf6 (patch) | |
tree | 7d08c74e73010dfe3bd735b592fd64f09de5ab9c /Modules/FindTCL.cmake | |
parent | 1dc7ae38ead50498b9e813d7c6e96f9d850b45ea (diff) | |
download | CMake-f07ee5b8177e9e08f290e3acdff6c31d6b694bf6.zip CMake-f07ee5b8177e9e08f290e3acdff6c31d6b694bf6.tar.gz CMake-f07ee5b8177e9e08f290e3acdff6c31d6b694bf6.tar.bz2 |
ENH: change find library and find program to look for more than one name
Diffstat (limited to 'Modules/FindTCL.cmake')
-rw-r--r-- | Modules/FindTCL.cmake | 54 |
1 files changed, 8 insertions, 46 deletions
diff --git a/Modules/FindTCL.cmake b/Modules/FindTCL.cmake index 0f864b1..e661917 100644 --- a/Modules/FindTCL.cmake +++ b/Modules/FindTCL.cmake @@ -3,58 +3,20 @@ # include files and libraries are. It also determines what the name of # the library is. This code sets the following variables: # -# TCL_LIB_PATH = the path to where the TCL library is -# TCL_LIBRARY = the name of the tcl library found (tcl tcl80 etc) +# TCL_LIBRARY = the full path to the tcl library found (tcl tcl80 etc) # TCL_INCLUDE_PATH = the path to where tcl.h can be found -# TK_LIB_PATH = the path to where the TK library is -# TK_LIBRARY = the name of the tk library found (tk tk80 etc) +# TK_LIBRARY = the full path to the tk library found (tk tk80 etc) # TK_INCLUDE_PATH = the path to where tk.h can be found # -# # try to find the Tcl libraries in a few places and names -IF (NOT TCL_LIB_PATH) - FIND_LIBRARY(TCL_LIB_PATH tcl "C:/Program Files/Tcl/lib" /usr/lib /usr/local/lib) - IF (TCL_LIB_PATH) - SET (TCL_LIBRARY tcl CACHE) - ENDIF (TCL_LIB_PATH) -ENDIF (NOT TCL_LIB_PATH) +FIND_LIBRARY(TCL_LIBRARY + NAMES tcl tcl82 tcl80 + PATHS /usr/lib "C:/Program Files/Tcl/lib" /usr/local/lib) -IF (NOT TCL_LIB_PATH) - FIND_LIBRARY(TCL_LIB_PATH tcl82 "C:/Program Files/Tcl/lib" /usr/lib /usr/local/lib) - IF (TCL_LIB_PATH) - SET (TCL_LIBRARY tcl82 CACHE) - ENDIF (TCL_LIB_PATH) -ENDIF (NOT TCL_LIB_PATH) - -IF (NOT TCL_LIB_PATH) - FIND_LIBRARY(TCL_LIB_PATH tcl80 "C:/Program Files/Tcl/lib" /usr/lib /usr/local/lib) - IF (TCL_LIB_PATH) - SET (TCL_LIBRARY tcl80 CACHE) - ENDIF (TCL_LIB_PATH) -ENDIF (NOT TCL_LIB_PATH) - -# try to find the Tk libraries in a few places and names -IF (NOT TK_LIB_PATH) - FIND_LIBRARY(TK_LIB_PATH tk "C:/Program Files/Tcl/lib" /usr/lib /usr/local/lib) - IF (TK_LIB_PATH) - SET (TK_LIBRARY tk CACHE) - ENDIF (TK_LIB_PATH) -ENDIF (NOT TK_LIB_PATH) - -IF (NOT TK_LIB_PATH) - FIND_LIBRARY(TK_LIB_PATH tk82 "C:/Program Files/Tcl/lib" /usr/lib /usr/local/lib) - IF (TK_LIB_PATH) - SET (TK_LIBRARY tk82 CACHE) - ENDIF (TK_LIB_PATH) -ENDIF (NOT TK_LIB_PATH) - -IF (NOT TK_LIB_PATH) - FIND_LIBRARY(TK_LIB_PATH tk80 "C:/Program Files/Tcl/lib" /usr/lib /usr/local/lib) - IF (TK_LIB_PATH) - SET (TK_LIBRARY tk80 CACHE) - ENDIF (TK_LIB_PATH) -ENDIF (NOT TK_LIB_PATH) +FIND_LIBRARY(TK_LIBRARY + NAMES tk tk82 tk80 + PATHS /usr/lib "C:/Program Files/Tcl/lib" /usr/local/lib) # add in the include path FIND_PATH(TCL_INCLUDE_PATH tcl.h "C:/Program Files/Tcl/include" /usr/include /usr/local/include) |