diff options
author | Rolf Eike Beer <eike@sf-mail.de> | 2012-01-25 18:37:00 +0100 |
---|---|---|
committer | Rolf Eike Beer <eike@sf-mail.de> | 2012-01-25 18:37:25 +0100 |
commit | e01fe583b80208b1cd28f429cfac9c866453a994 (patch) | |
tree | 8eb274d0bd17b5e49b6f95515a619f8e9baf3b53 /Modules/FindTCL.cmake | |
parent | 731f996ce070bbba1b4913050497afa95436f2d2 (diff) | |
download | cmake-e01fe583b80208b1cd28f429cfac9c866453a994.tar.gz |
FindTclsh: support version selection
Diffstat (limited to 'Modules/FindTCL.cmake')
-rw-r--r-- | Modules/FindTCL.cmake | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/Modules/FindTCL.cmake b/Modules/FindTCL.cmake index 13f32f81e7..f2c776f973 100644 --- a/Modules/FindTCL.cmake +++ b/Modules/FindTCL.cmake @@ -48,10 +48,14 @@ INCLUDE(CMakeFindFrameworks) INCLUDE(FindTclsh) 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}") +IF(TCLSH_VERSION_STRING) + SET(TCL_TCLSH_VERSION "${TCLSH_VERSION_STRING}") +ELSE(TCLSH_VERSION_STRING) + 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}") +ENDIF(TCLSH_VERSION_STRING) GET_FILENAME_COMPONENT(TK_WISH_PATH "${TK_WISH}" PATH) GET_FILENAME_COMPONENT(TK_WISH_PATH_PARENT "${TK_WISH_PATH}" PATH) |