diff options
Diffstat (limited to 'Modules/FindTclsh.cmake')
-rw-r--r-- | Modules/FindTclsh.cmake | 7 |
1 files changed, 7 insertions, 0 deletions
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 |