diff options
author | Sebastien Barre <sebastien.barre@kitware.com> | 2008-01-18 18:15:12 (GMT) |
---|---|---|
committer | Sebastien Barre <sebastien.barre@kitware.com> | 2008-01-18 18:15:12 (GMT) |
commit | 4f37eacfdbcdda1f68edfa9e4428c9a040f797fb (patch) | |
tree | b85a155e908314c11d2c479db5eecfdd5d06708e /Modules | |
parent | f74c8cf0d87337f3a2f66a2c0b8ed682ad5b9e5c (diff) | |
download | CMake-4f37eacfdbcdda1f68edfa9e4428c9a040f797fb.zip CMake-4f37eacfdbcdda1f68edfa9e4428c9a040f797fb.tar.gz CMake-4f37eacfdbcdda1f68edfa9e4428c9a040f797fb.tar.bz2 |
ENH: cleanup FindPerl and FindTcl (use ActiveState CurrentVersion, and support Tcl/Tk 8.5)
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/FindPerl.cmake | 8 | ||||
-rw-r--r-- | Modules/FindTCL.cmake | 99 | ||||
-rw-r--r-- | Modules/FindTclsh.cmake | 23 | ||||
-rw-r--r-- | Modules/FindWish.cmake | 27 |
4 files changed, 133 insertions, 24 deletions
diff --git a/Modules/FindPerl.cmake b/Modules/FindPerl.cmake index 3ee31fa..0ce3408 100644 --- a/Modules/FindPerl.cmake +++ b/Modules/FindPerl.cmake @@ -6,11 +6,15 @@ INCLUDE(FindCygwin) +GET_FILENAME_COMPONENT( + ActivePerl_CurrentVersion + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\ActiveState\\ActivePerl;CurrentVersion]" + NAME) + FIND_PROGRAM(PERL_EXECUTABLE perl "C:/Perl/bin" - [HKEY_LOCAL_MACHINE\\SOFTWARE\\ActiveState\\ActivePerl\\804]/bin - [HKEY_LOCAL_MACHINE\\SOFTWARE\\ActiveState\\ActivePerl\\628]/bin + [HKEY_LOCAL_MACHINE\\SOFTWARE\\ActiveState\\ActivePerl\\${ActivePerl_CurrentVersion}]/bin ${CYGWIN_INSTALL_PATH}/bin ) diff --git a/Modules/FindTCL.cmake b/Modules/FindTCL.cmake index 2178a9a..9a73d40 100644 --- a/Modules/FindTCL.cmake +++ b/Modules/FindTCL.cmake @@ -24,16 +24,32 @@ INCLUDE(FindTclsh) INCLUDE(FindWish) GET_FILENAME_COMPONENT(TCL_TCLSH_PATH "${TCL_TCLSH}" PATH) +GET_FILENAME_COMPONENT(TCL_TCLSH_PATH_PARENT "${TCL_TCLSH_PATH}" PATH) + GET_FILENAME_COMPONENT(TK_WISH_PATH "${TK_WISH}" PATH) +GET_FILENAME_COMPONENT(TK_WISH_PATH_PARENT "${TK_WISH_PATH}" PATH) + +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_PARENT "${TCL_LIBRARY_PATH}" PATH) +GET_FILENAME_COMPONENT(TK_LIBRARY_PATH_PARENT "${TK_LIBRARY_PATH}" PATH) + +GET_FILENAME_COMPONENT( + ActiveTcl_CurrentVersion + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\ActiveState\\ActiveTcl;CurrentVersion]" + NAME) SET (TCLTK_POSSIBLE_LIB_PATHS - "${TCL_TCLSH_PATH}/../lib" - "${TK_WISH_PATH}/../lib" - "${TCL_INCLUDE_PATH}/../lib" - "${TK_INCLUDE_PATH}/../lib" + "${TCL_TCLSH_PATH_PARENT}/lib" + "${TK_WISH_PATH_PARENT}/lib" + "${TCL_INCLUDE_PATH_PARENT}/lib" + "${TK_INCLUDE_PATH_PARENT}/lib" "$ENV{ProgramFiles}/Tcl/Lib" "C:/Program Files/Tcl/lib" "C:/Tcl/lib" + [HKEY_LOCAL_MACHINE\\SOFTWARE\\ActiveState\\ActiveTcl\\${ActiveTcl_CurrentVersion}]/lib + [HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.5;Root]/lib [HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.4;Root]/lib [HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.3;Root]/lib [HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.2;Root]/lib @@ -43,42 +59,90 @@ SET (TCLTK_POSSIBLE_LIB_PATHS ) FIND_LIBRARY(TCL_LIBRARY - NAMES tcl tcl84 tcl8.4 tcl83 tcl8.3 tcl82 tcl8.2 tcl80 tcl8.0 + NAMES tcl + tcl85 tcl8.5 + tcl84 tcl8.4 + tcl83 tcl8.3 + tcl82 tcl8.2 + tcl80 tcl8.0 PATHS ${TCLTK_POSSIBLE_LIB_PATHS} ) FIND_LIBRARY(TCL_LIBRARY_DEBUG - NAMES tcld tcl84d tcl8.4d tcl83d tcl8.3d tcl82d tcl8.2d tcl80d tcl8.0d + NAMES tcld + tcl85d tcl8.5d + tcl85g tcl8.5g + tcl84d tcl8.4d + tcl84g tcl8.4g + tcl83d tcl8.3d + tcl82d tcl8.2d + tcl80d tcl8.0d PATHS ${TCLTK_POSSIBLE_LIB_PATHS} ) FIND_LIBRARY(TCL_STUB_LIBRARY - NAMES tclstub tclstub84 tclstub8.4 tclstub83 tclstub8.3 tclstub82 tclstub8.2 tclstub80 tclstub8.0 + NAMES tclstub + tclstub85 tclstub8.5 + tclstub84 tclstub8.4 + tclstub83 tclstub8.3 + tclstub82 tclstub8.2 + tclstub80 tclstub8.0 PATHS ${TCLTK_POSSIBLE_LIB_PATHS} ) FIND_LIBRARY(TCL_STUB_LIBRARY_DEBUG - NAMES tclstubd tclstub84d tclstub8.4d tclstub83d tclstub8.3d tclstub82d tclstub8.2d tclstub80d tclstub8.0d + NAMES tclstubd + tclstub85d tclstub8.5d + tclstub85g tclstub8.5g + tclstub84d tclstub8.4d + tclstub84g tclstub8.4g + tclstub83d tclstub8.3d + tclstub82d tclstub8.2d + tclstub80d tclstub8.0d PATHS ${TCLTK_POSSIBLE_LIB_PATHS} ) FIND_LIBRARY(TK_LIBRARY - NAMES tk tk84 tk8.4 tk83 tk8.3 tk82 tk8.2 tk80 tk8.0 + NAMES tk + tk85 tk8.5 + tk84 tk8.4 + tk83 tk8.3 + tk82 tk8.2 + tk80 tk8.0 PATHS ${TCLTK_POSSIBLE_LIB_PATHS} ) FIND_LIBRARY(TK_LIBRARY_DEBUG - NAMES tkd tk84d tk8.4d tk83d tk8.3d tk82d tk8.2d tk80d tk8.0d + NAMES tkd + tk85d tk8.5d + tk85g tk8.5g + tk84d tk8.4d + tk84g tk8.4g + tk83d tk8.3d + tk82d tk8.2d + tk80d tk8.0d PATHS ${TCLTK_POSSIBLE_LIB_PATHS} ) FIND_LIBRARY(TK_STUB_LIBRARY - NAMES tkstub tkstub84 tkstub8.4 tkstub83 tkstub8.3 tkstub82 tkstub8.2 tkstub80 tkstub8.0 + NAMES tkstub + tkstub85 tkstub8.5 + tkstub84 tkstub8.4 + tkstub83 tkstub8.3 + tkstub82 tkstub8.2 + tkstub80 tkstub8.0 PATHS ${TCLTK_POSSIBLE_LIB_PATHS} ) FIND_LIBRARY(TK_STUB_LIBRARY_DEBUG - NAMES tkstubd tkstub84d tkstub8.4d tkstub83d tkstub8.3d tkstub82d tkstub8.2d tkstub80d tkstub8.0d + NAMES tkstubd + tkstub85d tkstub8.5d + tkstub85g tkstub8.5g + tkstub84d tkstub8.4d + tkstub84g tkstub8.4g + tkstub83d tkstub8.3d + tkstub82d tkstub8.2d + tkstub80d tkstub8.0d PATHS ${TCLTK_POSSIBLE_LIB_PATHS} ) @@ -108,10 +172,12 @@ GET_FILENAME_COMPONENT(TCL_LIBRARY_PATH "${TCL_LIBRARY}" PATH) GET_FILENAME_COMPONENT(TK_LIBRARY_PATH "${TK_LIBRARY}" PATH) SET (TCLTK_POSSIBLE_INCLUDE_PATHS - ${TCL_TCLSH_PATH}/../include - ${TK_WISH_PATH}/../include - "${TCL_LIBRARY_PATH}/../include" - "${TK_LIBRARY_PATH}/../include" + ${TCL_TCLSH_PATH_PARENT}/include + ${TK_WISH_PATH_PARENT}/include + "${TCL_LIBRARY_PATH_PARENT}/include" + "${TK_LIBRARY_PATH_PARENT}/include" + [HKEY_LOCAL_MACHINE\\SOFTWARE\\ActiveState\\ActiveTcl\\${ActiveTcl_CurrentVersion}]/include + [HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.5;Root]/include [HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.4;Root]/include [HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.3;Root]/include [HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.2;Root]/include @@ -121,6 +187,7 @@ SET (TCLTK_POSSIBLE_INCLUDE_PATHS C:/Tcl/include /usr/include /usr/local/include + /usr/include/tcl8.5 /usr/include/tcl8.4 /usr/include/tcl8.3 /usr/include/tcl8.2 diff --git a/Modules/FindTclsh.cmake b/Modules/FindTclsh.cmake index c1ab91f..aaed8dd 100644 --- a/Modules/FindTclsh.cmake +++ b/Modules/FindTclsh.cmake @@ -11,21 +11,34 @@ IF(WIN32 AND UNIX) FIND_PROGRAM(TCL_TCLSH NAMES cygtclsh83 cygtclsh80) ENDIF(WIN32 AND UNIX) +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(TK_LIBRARY_PATH "${TK_LIBRARY}" PATH) +GET_FILENAME_COMPONENT(TCL_LIBRARY_PATH_PARENT "${TCL_LIBRARY_PATH}" PATH) +GET_FILENAME_COMPONENT(TK_LIBRARY_PATH_PARENT "${TK_LIBRARY_PATH}" PATH) + +GET_FILENAME_COMPONENT( + ActiveTcl_CurrentVersion + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\ActiveState\\ActiveTcl;CurrentVersion]" + NAME) + FIND_PROGRAM(TCL_TCLSH NAMES tclsh + tclsh85 tclsh8.5 tclsh84 tclsh8.4 tclsh83 tclsh8.3 tclsh82 tclsh8.2 tclsh80 tclsh8.0 PATHS - "${TCL_INCLUDE_PATH}/../bin" - "${TK_INCLUDE_PATH}/../bin" - "${TCL_LIBRARY_PATH}/../bin" - "${TK_LIBRARY_PATH}/../bin" - [HKEY_LOCAL_MACHINE\\SOFTWARE\\ActiveState\\ActiveTcl\\8.4.6.0]/bin + "${TCL_INCLUDE_PATH_PARENT}/bin" + "${TK_INCLUDE_PATH_PARENT}/bin" + "${TCL_LIBRARY_PATH_PARENT}/bin" + "${TK_LIBRARY_PATH_PARENT}/bin" + [HKEY_LOCAL_MACHINE\\SOFTWARE\\ActiveState\\ActiveTcl\\${ActiveTcl_CurrentVersion}]/bin + [HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.5;Root]/bin [HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.4;Root]/bin [HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.3;Root]/bin [HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.2;Root]/bin diff --git a/Modules/FindWish.cmake b/Modules/FindWish.cmake index c8cd3f7..d678b8f 100644 --- a/Modules/FindWish.cmake +++ b/Modules/FindWish.cmake @@ -10,9 +10,34 @@ IF(UNIX) FIND_PROGRAM(TK_WISH cygwish80 ) ENDIF(UNIX) +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(TK_LIBRARY_PATH "${TK_LIBRARY}" PATH) + +GET_FILENAME_COMPONENT(TCL_LIBRARY_PATH_PARENT "${TCL_LIBRARY_PATH}" PATH) +GET_FILENAME_COMPONENT(TK_LIBRARY_PATH_PARENT "${TK_LIBRARY_PATH}" PATH) + +GET_FILENAME_COMPONENT( + ActiveTcl_CurrentVersion + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\ActiveState\\ActiveTcl;CurrentVersion]" + NAME) + FIND_PROGRAM(TK_WISH - NAMES wish wish84 wish8.4 wish83 wish8.3 wish82 wish8.2 wish80 + NAMES wish + wish85 wish8.5 + wish84 wish8.4 + wish83 wish8.3 + wish82 wish8.2 + wish80 wish8.0 PATHS + "${TCL_INCLUDE_PATH_PARENT}/bin" + "${TK_INCLUDE_PATH_PARENT}/bin" + "${TCL_LIBRARY_PATH_PARENT}/bin" + "${TK_LIBRARY_PATH_PARENT}/bin" + [HKEY_LOCAL_MACHINE\\SOFTWARE\\ActiveState\\ActiveTcl\\${ActiveTcl_CurrentVersion}]/bin + [HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.5;Root]/bin [HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.4;Root]/bin [HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.3;Root]/bin [HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.2;Root]/bin |