Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/pickups2/cmake/FindTCL.cmake @ 2435

Last change on this file since 2435 was 1872, checked in by rgrieder, 16 years ago
  • Modified cmake files to support library finding when using Visual Studio precompiled dependencies
  • Removed vorbisenc executable from library dependency
  • Property svn:eol-style set to native
File size: 2.7 KB
Line 
1# - Find Tcl includes and libraries.
2# This module finds if TCL is installed and determines where the
3# include files and libraries are. It also determines what the name of
4# the library is. This code sets the following variables:
5#  TCL_LIBRARY        = path to Tcl library (tcl tcl80)
6#  TCL_LIBRARY_DEBUG  = path to Tcl library (debug)
7#  TCL_INCLUDE_PATH   = path to where tcl.h can be found
8#
9# Several changes and additions by Fabian 'x3n' Landau
10#                 > www.orxonox.net <
11
12IF (TCL_LIBRARY AND TCL_INCLUDE_PATH)
13  SET(TCL_FIND_QUIETLY TRUE)
14ENDIF (TCL_LIBRARY AND TCL_INCLUDE_PATH)
15
16SET (TCLTK_POSSIBLE_LIB_PATHS
17  "${TCL_TCLSH_PATH}/../lib"
18  "${TK_WISH_PATH}/../lib"
19  "${TCL_INCLUDE_PATH}/../lib"
20  "${TK_INCLUDE_PATH}/../lib"
21  "$ENV{ProgramFiles}/Tcl/Lib"
22  "C:/Program Files/Tcl/lib" 
23  "C:/Tcl/lib" 
24  [HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.5;Root]/lib
25  [HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.4;Root]/lib
26  /usr/lib 
27  /usr/local/lib
28  /usr/pack/tcltk-8.4.9.linux-mo/lib
29  ../libs/tcl8.5.2/win
30  ../libs/tcl8.5.2/unix
31  ../libs/tcl8.5.2/macosx
32  ${DEPENDENCY_DIR}/tcl-8.5.2/lib
33)
34
35FIND_LIBRARY(TCL_LIBRARY
36  NAMES tcl tcl85 tcl8.5 tcl84 tcl8.4 tcl85t
37  PATHS ${TCLTK_POSSIBLE_LIB_PATHS}
38)
39
40FIND_LIBRARY(TCL_LIBRARY_DEBUG
41  NAMES tcld tcl85d tcl8.5d tcl84d tcl8.4d
42  PATHS ${TCLTK_POSSIBLE_LIB_PATHS}
43)
44
45SET (TCLTK_POSSIBLE_INCLUDE_PATHS
46  ${TCL_TCLSH_PATH}/../include
47  ${TK_WISH_PATH}/../include
48  "${TCL_LIBRARY_PATH}/../include"
49  "${TK_LIBRARY_PATH}/../include"
50  [HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.5;Root]/include
51  [HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.4;Root]/include
52  "$ENV{ProgramFiles}/Tcl/include"
53  "C:/Program Files/Tcl/include"
54  C:/Tcl/include
55  /usr/include
56  /usr/local/include
57  /usr/include/tcl8.5
58  /usr/include/tcl8.4
59  ../libs/tcl8.5.2/generic
60  ${DEPENDENCY_DIR}/tcl-8.5.2/include
61)
62
63FIND_PATH(TCL_INCLUDE_PATH tcl.h
64  ${TCL_FRAMEWORK_INCLUDES} ${TCLTK_POSSIBLE_INCLUDE_PATHS}
65)
66
67
68IF (TCL_LIBRARY AND TCL_INCLUDE_PATH)
69  IF (NOT TCL_FIND_QUIETLY)
70    MESSAGE(STATUS "Tcl was found")
71    IF (VERBOSE_FIND)
72      MESSAGE (STATUS "  include path: ${TCL_INCLUDE_PATH}")
73      MESSAGE (STATUS "  library path: ${TCL_LIBRARY}")
74      MESSAGE (STATUS "  libraries:    tcld tcl85d tcl8.5d tcl84d tcl8.4d")
75    ENDIF (VERBOSE_FIND)
76  ENDIF (NOT TCL_FIND_QUIETLY)
77ELSE (TCL_LIBRARY AND TCL_INCLUDE_PATH)
78  IF (NOT TCL_INCLUDE_PATH)
79    MESSAGE(SEND_ERROR "Tcl include path was not found.")
80  ENDIF (NOT TCL_INCLUDE_PATH)
81  IF (NOT TCL_LIBRARY )
82    MESSAGE(SEND_ERROR "Tcl library was not found.")
83  ENDIF (NOT TCL_LIBRARY )
84ENDIF (TCL_LIBRARY AND TCL_INCLUDE_PATH)
85
86IF(TCL_INCLUDE_PATH)
87  IF(TCL_LIBRARY)
88    SET(TCL_FOUND 1)
89  ENDIF(TCL_LIBRARY)
90ENDIF(TCL_INCLUDE_PATH)
Note: See TracBrowser for help on using the repository browser.