diff options
author | Sebastien Barre <sebastien.barre@kitware.com> | 2008-01-26 06:11:04 (GMT) |
---|---|---|
committer | Sebastien Barre <sebastien.barre@kitware.com> | 2008-01-26 06:11:04 (GMT) |
commit | 59d29d6079b735452e18676b0e572f6601d40fa7 (patch) | |
tree | 68eceea8541711172415181a79548b8e3c7ae146 /Modules/FindTCL.cmake | |
parent | a35145fb272802a9c1ddf10fdcfc1f27a4361816 (diff) | |
download | CMake-59d29d6079b735452e18676b0e572f6601d40fa7.zip CMake-59d29d6079b735452e18676b0e572f6601d40fa7.tar.gz CMake-59d29d6079b735452e18676b0e572f6601d40fa7.tar.bz2 |
ENH: Update Tcl/Tk 8.5
Diffstat (limited to 'Modules/FindTCL.cmake')
-rw-r--r-- | Modules/FindTCL.cmake | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/Modules/FindTCL.cmake b/Modules/FindTCL.cmake index 6af7ea7..b61fc60 100644 --- a/Modules/FindTCL.cmake +++ b/Modules/FindTCL.cmake @@ -37,18 +37,26 @@ INCLUDE(FindWish) GET_FILENAME_COMPONENT(TCL_TCLSH_PATH "${TCL_TCLSH}" PATH) GET_FILENAME_COMPONENT(TCL_TCLSH_PATH_PARENT "${TCL_TCLSH_PATH}" PATH) +STRING(REGEX REPLACE + "^.*tclsh([0-9]\\.*[0-9]).*$" "\\1" TCL_TCLSH_VERSION "${TCL_TCLSH}") GET_FILENAME_COMPONENT(TK_WISH_PATH "${TK_WISH}" PATH) GET_FILENAME_COMPONENT(TK_WISH_PATH_PARENT "${TK_WISH_PATH}" PATH) +STRING(REGEX REPLACE + "^.*wish([0-9]\\.*[0-9]).*$" "\\1" TK_WISH_VERSION "${TK_WISH}") GET_FILENAME_COMPONENT(TCL_INCLUDE_PATH_PARENT "${TCL_INCLUDE_PATH}" PATH) GET_FILENAME_COMPONENT(TK_INCLUDE_PATH_PARENT "${TK_INCLUDE_PATH}" PATH) GET_FILENAME_COMPONENT(TCL_LIBRARY_PATH "${TCL_LIBRARY}" PATH) GET_FILENAME_COMPONENT(TCL_LIBRARY_PATH_PARENT "${TCL_LIBRARY_PATH}" PATH) +STRING(REGEX REPLACE + "^.*tcl([0-9]\\.*[0-9]).*$" "\\1" TCL_LIBRARY_VERSION "${TCL_LIBRARY}") GET_FILENAME_COMPONENT(TK_LIBRARY_PATH "${TK_LIBRARY}" PATH) GET_FILENAME_COMPONENT(TK_LIBRARY_PATH_PARENT "${TK_LIBRARY_PATH}" PATH) +STRING(REGEX REPLACE + "^.*tk([0-9]\\.*[0-9]).*$" "\\1" TK_LIBRARY_VERSION "${TK_LIBRARY}") SET(TCLTK_POSSIBLE_LIB_PATHS "${TCL_INCLUDE_PATH_PARENT}/lib" @@ -81,7 +89,9 @@ IF(WIN32) ENDIF(WIN32) FIND_LIBRARY(TCL_LIBRARY - NAMES tcl + NAMES + tcl + tcl${TK_LIBRARY_VERSION} tcl${TCL_TCLSH_VERSION} tcl${TK_WISH_VERSION} tcl86 tcl8.6 tcl85 tcl8.5 tcl84 tcl8.4 @@ -92,7 +102,9 @@ FIND_LIBRARY(TCL_LIBRARY ) FIND_LIBRARY(TK_LIBRARY - NAMES tk + NAMES + tk + tk${TCL_LIBRARY_VERSION} tk${TCL_TCLSH_VERSION} tk${TK_WISH_VERSION} tk86 tk8.6 tk85 tk8.5 tk84 tk8.4 @@ -135,6 +147,8 @@ SET(TCLTK_POSSIBLE_INCLUDE_PATHS "${TK_WISH_PATH_PARENT}/include" /usr/include /usr/local/include + /usr/include/tcl${TK_LIBRARY_VERSION} + /usr/include/tcl${TCL_LIBRARY_VERSION} /usr/include/tcl8.6 /usr/include/tcl8.5 /usr/include/tcl8.4 |