summaryrefslogtreecommitdiffstats
path: root/Modules/FindWish.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/FindWish.cmake')
-rw-r--r--Modules/FindWish.cmake7
1 files changed, 7 insertions, 0 deletions
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