summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorSebastien Barre <sebastien.barre@kitware.com>2004-01-09 20:57:17 (GMT)
committerSebastien Barre <sebastien.barre@kitware.com>2004-01-09 20:57:17 (GMT)
commit1b2e663dfb940a28eecde01784913c9006d0e2b3 (patch)
tree98cf6f7c2d4edaaa4aa79bc278eb059805971bbe /Modules
parent00332a958eed520c050ca6bf568f6e2491d8d2de (diff)
downloadCMake-1b2e663dfb940a28eecde01784913c9006d0e2b3.zip
CMake-1b2e663dfb940a28eecde01784913c9006d0e2b3.tar.gz
CMake-1b2e663dfb940a28eecde01784913c9006d0e2b3.tar.bz2
ENH: make it a bit smarter at finding stuff: now you need only to set *ONE* of (TCL|TK)_INCLUDE_PATH, (TCL|TK)_LIBRARY, TCL_TCLSH and the rest will be found.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/FindTCL.cmake12
-rw-r--r--Modules/FindTclsh.cmake7
2 files changed, 16 insertions, 3 deletions
diff --git a/Modules/FindTCL.cmake b/Modules/FindTCL.cmake
index e5c26e7..b55ce44 100644
--- a/Modules/FindTCL.cmake
+++ b/Modules/FindTCL.cmake
@@ -22,13 +22,14 @@ INCLUDE(${CMAKE_ROOT}/Modules/CMakeFindFrameworks.cmake)
INCLUDE(${CMAKE_ROOT}/Modules/FindTclsh.cmake)
INCLUDE(${CMAKE_ROOT}/Modules/FindWish.cmake)
-GET_FILENAME_COMPONENT(TCL_TCLSH_PATH ${TCL_TCLSH} PATH)
-
-GET_FILENAME_COMPONENT(TK_WISH_PATH ${TK_WISH} PATH)
+GET_FILENAME_COMPONENT(TCL_TCLSH_PATH "${TCL_TCLSH}" PATH)
+GET_FILENAME_COMPONENT(TK_WISH_PATH "${TK_WISH}" PATH)
SET (TCLTK_POSSIBLE_LIB_PATHS
"${TCL_TCLSH_PATH}/../lib"
"${TK_WISH_PATH}/../lib"
+ "${TCL_INCLUDE_PATH}/../lib"
+ "${TK_INCLUDE_PATH}/../lib"
"C:/Program Files/Tcl/lib"
"C:/Tcl/lib"
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.4;Root]/lib
@@ -101,9 +102,14 @@ IF(Tk_FRAMEWORKS)
ENDIF(NOT TK_INCLUDE_PATH)
ENDIF(Tk_FRAMEWORKS)
+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"
[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
diff --git a/Modules/FindTclsh.cmake b/Modules/FindTclsh.cmake
index 5a7e68a..362a078 100644
--- a/Modules/FindTclsh.cmake
+++ b/Modules/FindTclsh.cmake
@@ -14,6 +14,9 @@ IF(WIN32)
ENDIF(UNIX)
ENDIF(WIN32)
+GET_FILENAME_COMPONENT(TCL_LIBRARY_PATH "${TCL_LIBRARY}" PATH)
+GET_FILENAME_COMPONENT(TK_LIBRARY_PATH "${TK_LIBRARY}" PATH)
+
FIND_PROGRAM(TCL_TCLSH
NAMES tclsh
tclsh84 tclsh8.4
@@ -21,6 +24,10 @@ FIND_PROGRAM(TCL_TCLSH
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\\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