summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastien Barre <sebastien.barre@kitware.com>2008-01-26 06:11:04 (GMT)
committerSebastien Barre <sebastien.barre@kitware.com>2008-01-26 06:11:04 (GMT)
commit59d29d6079b735452e18676b0e572f6601d40fa7 (patch)
tree68eceea8541711172415181a79548b8e3c7ae146
parenta35145fb272802a9c1ddf10fdcfc1f27a4361816 (diff)
downloadCMake-59d29d6079b735452e18676b0e572f6601d40fa7.zip
CMake-59d29d6079b735452e18676b0e572f6601d40fa7.tar.gz
CMake-59d29d6079b735452e18676b0e572f6601d40fa7.tar.bz2
ENH: Update Tcl/Tk 8.5
-rw-r--r--Modules/FindTCL.cmake18
-rw-r--r--Modules/FindTclStub.cmake16
-rw-r--r--Modules/FindTclsh.cmake7
-rw-r--r--Modules/FindWish.cmake7
4 files changed, 44 insertions, 4 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
diff --git a/Modules/FindTclStub.cmake b/Modules/FindTclStub.cmake
index 05d43da..788dbe4 100644
--- a/Modules/FindTclStub.cmake
+++ b/Modules/FindTclStub.cmake
@@ -24,18 +24,26 @@ INCLUDE(FindTCL)
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"
@@ -68,7 +76,9 @@ IF(WIN32)
ENDIF(WIN32)
FIND_LIBRARY(TCL_STUB_LIBRARY
- NAMES tclstub
+ NAMES
+ tclstub
+ tclstub${TK_LIBRARY_VERSION} tclstub${TCL_TCLSH_VERSION} tclstub${TK_WISH_VERSION}
tclstub86 tclstub8.6
tclstub85 tclstub8.5
tclstub84 tclstub8.4
@@ -79,7 +89,9 @@ FIND_LIBRARY(TCL_STUB_LIBRARY
)
FIND_LIBRARY(TK_STUB_LIBRARY
- NAMES tkstub
+ NAMES
+ tkstub
+ tkstub${TCL_LIBRARY_VERSION} tkstub${TCL_TCLSH_VERSION} tkstub${TK_WISH_VERSION}
tkstub86 tkstub8.6
tkstub85 tkstub8.5
tkstub84 tkstub8.4
diff --git a/Modules/FindTclsh.cmake b/Modules/FindTclsh.cmake
index c9940cf..d2cc86b 100644
--- a/Modules/FindTclsh.cmake
+++ b/Modules/FindTclsh.cmake
@@ -13,15 +13,21 @@ ENDIF(WIN32 AND UNIX)
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_BIN_PATHS
"${TCL_INCLUDE_PATH_PARENT}/bin"
@@ -49,6 +55,7 @@ ENDIF(WIN32)
SET(TCL_TCLSH_NAMES
tclsh
+ tclsh${TCL_LIBRARY_VERSION} tclsh${TK_LIBRARY_VERSION} tclsh${TK_WISH_VERSION}
tclsh86 tclsh8.6
tclsh85 tclsh8.5
tclsh84 tclsh8.4
diff --git a/Modules/FindWish.cmake b/Modules/FindWish.cmake
index 4bafe76..86e9c67 100644
--- a/Modules/FindWish.cmake
+++ b/Modules/FindWish.cmake
@@ -12,15 +12,21 @@ ENDIF(UNIX)
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(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_BIN_PATHS
"${TCL_INCLUDE_PATH_PARENT}/bin"
@@ -48,6 +54,7 @@ ENDIF(WIN32)
SET(TK_WISH_NAMES
wish
+ wish${TCL_LIBRARY_VERSION} wish${TK_LIBRARY_VERSION} wish${TCL_TCLSH_VERSION}
wish86 wish8.6
wish85 wish8.5
wish84 wish8.4