[brlcad-commits] SF.net SVN: brlcad:[42964] brlcad/branches/cmake/misc/CMake/FindTCL.cmake
Open Source Solid Modeling CAD
Brought to you by:
brlcad
From: <sta...@us...> - 2011-02-03 18:11:48
|
Revision: 42964 http://brlcad.svn.sourceforge.net/brlcad/?rev=42964&view=rev Author: starseeker Date: 2011-02-03 18:11:42 +0000 (Thu, 03 Feb 2011) Log Message: ----------- Do a better job of generalizing the exec search options Modified Paths: -------------- brlcad/branches/cmake/misc/CMake/FindTCL.cmake Modified: brlcad/branches/cmake/misc/CMake/FindTCL.cmake =================================================================== --- brlcad/branches/cmake/misc/CMake/FindTCL.cmake 2011-02-03 16:55:26 UTC (rev 42963) +++ brlcad/branches/cmake/misc/CMake/FindTCL.cmake 2011-02-03 18:11:42 UTC (rev 42964) @@ -606,24 +606,22 @@ endif() IF(${line} MATCHES "TCL_EXEC_PREFIX") IF(MSVC) - STRING(REGEX REPLACE ".*TCL_EXEC_PREFIX='(.+)'.*" "\\1" TCL_TCLSH_EXECUTABLE ${line}) - IF (EXISTS "${TCL_TCLSH_EXECUTABLE}/bin/tclsh${TCL_VERSION_MAJOR}${TCL_VERSION_MINOR}.exe") - SET(TCL_TCLSH_EXECUTABLE "${TCL_TCLSH_EXECUTABLE}/bin/tclsh${TCL_VERSION_MAJOR}${TCL_VERSION_MINOR}.exe") - ELSEIF(EXISTS "${TCL_TCLSH_EXECUTABLE}/bin/tclsh-${TCL_VERSION_MAJOR}.${TCL_VERSION_MINOR}.exe") - SET(TCL_TCLSH_EXECUTABLE "${TCL_TCLSH_EXECUTABLE}/bin/tclsh${TCL_VERSION_MAJOR}.${TCL_VERSION_MINOR}.exe") - ELSEIF(EXISTS "${TCL_TCLSH_EXECUTABLE}/bin/tclsh.exe") - SET(TCL_TCLSH_EXECUTABLE "${TCL_TCLSH_EXECUTABLE}/bin/tclsh.exe") - ENDIF() + SET(TCL_EXE_SUFFICX ".exe") ELSE(MSVC) + SET(TCL_EXE_SUFFICX "") + ENDIF(MSVC) STRING(REGEX REPLACE ".*TCL_EXEC_PREFIX='(.+)'.*" "\\1" TCL_TCLSH_EXECUTABLE ${line}) - IF (EXISTS "${TCL_TCLSH_EXECUTABLE}/bin/tclsh${TCL_VERSION_MAJOR}${TCL_VERSION_MINOR}") - SET(TCL_TCLSH_EXECUTABLE "${TCL_TCLSH_EXECUTABLE}/bin/tclsh${TCL_VERSION_MAJOR}${TCL_VERSION_MINOR}") - ELSEIF(EXISTS "${TCL_TCLSH_EXECUTABLE}/bin/tclsh-${TCL_VERSION_MAJOR}.${TCL_VERSION_MINOR}") - SET(TCL_TCLSH_EXECUTABLE "${TCL_TCLSH_EXECUTABLE}/bin/tclsh-${TCL_VERSION_MAJOR}.${TCL_VERSION_MINOR}") + IF (EXISTS "${TCL_TCLSH_EXECUTABLE}/bin/tclsh${TCL_VERSION_MAJOR}${TCL_VERSION_MINOR}${TCL_EXE_SUFFIX}") + SET(TCL_TCLSH_EXECUTABLE "${TCL_TCLSH_EXECUTABLE}/bin/tclsh${TCL_VERSION_MAJOR}${TCL_VERSION_MINOR}${TCL_EXE_SUFFIX}") + ELSEIF(EXISTS "${TCL_TCLSH_EXECUTABLE}/bin/tclsh${TCL_VERSION_MAJOR}.${TCL_VERSION_MINOR}${TCL_EXE_SUFFIX}") + SET(TCL_TCLSH_EXECUTABLE "${TCL_TCLSH_EXECUTABLE}/bin/tclsh${TCL_VERSION_MAJOR}.${TCL_VERSION_MINOR}${TCL_EXE_SUFFIX}") + ELSEIF(EXISTS "${TCL_TCLSH_EXECUTABLE}/bin/tclsh-${TCL_VERSION_MAJOR}${TCL_VERSION_MINOR}${TCL_EXE_SUFFIX}") + SET(TCL_TCLSH_EXECUTABLE "${TCL_TCLSH_EXECUTABLE}/bin/tclsh-${TCL_VERSION_MAJOR}${TCL_VERSION_MINOR}${TCL_EXE_SUFFIX}") + ELSEIF(EXISTS "${TCL_TCLSH_EXECUTABLE}/bin/tclsh-${TCL_VERSION_MAJOR}.${TCL_VERSION_MINOR}${TCL_EXE_SUFFIX}") + SET(TCL_TCLSH_EXECUTABLE "${TCL_TCLSH_EXECUTABLE}/bin/tclsh-${TCL_VERSION_MAJOR}.${TCL_VERSION_MINOR}${TCL_EXE_SUFFIX}") ELSEIF(EXISTS "${TCL_TCLSH_EXECUTABLE}/bin/tclsh") SET(TCL_TCLSH_EXECUTABLE "${TCL_TCLSH_EXECUTABLE}/bin/tclsh") ENDIF() - ENDIF(MSVC) endif() IF(${line} MATCHES "TCL_STUB_LIB_PATH") STRING(REGEX REPLACE ".*TCL_STUB_LIB_PATH='(.+)/lib.*" "\\1" TCL_STUB_LIB_PATH ${line}) @@ -658,24 +656,22 @@ endif() IF(${line} MATCHES "TK_EXEC_PREFIX") IF(MSVC) - STRING(REGEX REPLACE ".*TK_EXEC_PREFIX='(.+)'.*" "\\1" TCL_WISH_EXECUTABLE ${line}) - IF (EXISTS "${TCL_WISH_EXECUTABLE}/bin/wish${TK_VERSION_MAJOR}${TK_VERSION_MINOR}.exe") - SET(TCL_WISH_EXECUTABLE "${TCL_WISH_EXECUTABLE}/bin/wish${TK_VERSION_MAJOR}${TK_VERSION_MINOR}.exe") - ELSEIF(EXISTS "${TCL_WISH_EXECUTABLE}/bin/wish-${TK_VERSION_MAJOR}.${TK_VERSION_MINOR}.exe") - SET(TCL_WISH_EXECUTABLE "${TCL_WISH_EXECUTABLE}/bin/wish-${TK_VERSION_MAJOR}.${TK_VERSION_MINOR}.exe") - ELSEIF(EXISTS "${TCL_WISH_EXECUTABLE}/bin/wish.exe") - SET(TCL_WISH_EXECUTABLE "${TCL_WISH_EXECUTABLE}/bin/wish.exe") - ENDIF() + SET(TK_EXE_SUFFIX ".exe") ELSE(MSVC) + SET(TK_EXE_SUFFIX "") + ENDIF(MSVC) STRING(REGEX REPLACE ".*TK_EXEC_PREFIX='(.+)'.*" "\\1" TCL_WISH_EXECUTABLE ${line}) - IF (EXISTS "${TCL_WISH_EXECUTABLE}/bin/wish${TK_VERSION_MAJOR}${TK_VERSION_MINOR}") - SET(TCL_WISH_EXECUTABLE "${TCL_WISH_EXECUTABLE}/bin/wish${TK_VERSION_MAJOR}${TK_VERSION_MINOR}") - ELSEIF (EXISTS "${TCL_WISH_EXECUTABLE}/bin/wish-${TK_VERSION_MAJOR}.${TK_VERSION_MINOR}") - SET(TCL_WISH_EXECUTABLE "${TCL_WISH_EXECUTABLE}/bin/wish-${TK_VERSION_MAJOR}.${TK_VERSION_MINOR}") - ELSEIF (EXISTS "${TCL_WISH_EXECUTABLE}/bin/wish") + IF (EXISTS "${TCL_WISH_EXECUTABLE}/bin/wish${TK_VERSION_MAJOR}${TK_VERSION_MINOR}${TK_EXE_SUFFIX}") + SET(TCL_WISH_EXECUTABLE "${TCL_WISH_EXECUTABLE}/bin/wish${TK_VERSION_MAJOR}${TK_VERSION_MINOR}${TK_EXE_SUFFIX}") + ELSEIF(EXISTS "${TCL_WISH_EXECUTABLE}/bin/wish${TK_VERSION_MAJOR}.${TK_VERSION_MINOR}${TK_EXE_SUFFIX}") + SET(TCL_WISH_EXECUTABLE "${TCL_WISH_EXECUTABLE}/bin/wish${TK_VERSION_MAJOR}.${TK_VERSION_MINOR}${TK_EXE_SUFFIX}") + ELSEIF(EXISTS "${TCL_WISH_EXECUTABLE}/bin/wish-${TK_VERSION_MAJOR}${TK_VERSION_MINOR}${TK_EXE_SUFFIX}") + SET(TCL_WISH_EXECUTABLE "${TCL_WISH_EXECUTABLE}/bin/wish-${TK_VERSION_MAJOR}${TK_VERSION_MINOR}${TK_EXE_SUFFIX}") + ELSEIF(EXISTS "${TCL_WISH_EXECUTABLE}/bin/wish-${TK_VERSION_MAJOR}.${TK_VERSION_MINOR}${TK_EXE_SUFFIX}") + SET(TCL_WISH_EXECUTABLE "${TCL_WISH_EXECUTABLE}/bin/wish-${TK_VERSION_MAJOR}.${TK_VERSION_MINOR}${TK_EXE_SUFFIX}") + ELSEIF(EXISTS "${TCL_WISH_EXECUTABLE}/bin/wish") SET(TCL_WISH_EXECUTABLE "${TCL_WISH_EXECUTABLE}/bin/wish") - ENDIF() - ENDIF(MSVC) + ENDIF() endif() ENDFOREACH(line ${ENT}) IF(NOT TK_INCLUDE_PATH) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |