Changeset 1161
- Timestamp:
- Apr 24, 2008, 2:11:23 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/console/cmake/FindTCL.cmake
r1151 r1161 4 4 # the library is. This code sets the following variables: 5 5 # TCL_LIBRARY = path to Tcl library (tcl tcl80) 6 # TCL_LIBRARY_DEBUG = path to Tcl library (debug) 7 # TCL_STUB_LIBRARY = path to Tcl stub library 8 # TCL_STUB_LIBRARY_DEBUG = path to debug stub library 6 9 # TCL_INCLUDE_PATH = path to where tcl.h can be found 10 # TCL_TCLSH = path to tclsh binary (tcl tcl80) 11 # TK_LIBRARY = path to Tk library (tk tk80 etc) 12 # TK_LIBRARY_DEBUG = path to Tk library (debug) 13 # TK_STUB_LIBRARY = path to Tk stub library 14 # TK_STUB_LIBRARY_DEBUG = path to debug Tk stub library 15 # TK_INCLUDE_PATH = path to where tk.h can be found 16 # TK_INTERNAL_PATH = path to where tkWinInt.h is found 17 # TK_WISH = full path to the wish executable 18 19 INCLUDE(CMakeFindFrameworks) 20 INCLUDE(FindTclsh) 21 INCLUDE(FindWish) 7 22 8 23 GET_FILENAME_COMPONENT(TCL_TCLSH_PATH "${TCL_TCLSH}" PATH) 24 GET_FILENAME_COMPONENT(TK_WISH_PATH "${TK_WISH}" PATH) 9 25 10 26 SET (TCLTK_POSSIBLE_LIB_PATHS 11 /usr/lib 12 /usr/local/lib 27 "${TCL_TCLSH_PATH}/../lib" 28 "${TK_WISH_PATH}/../lib" 29 "${TCL_INCLUDE_PATH}/../lib" 30 "${TK_INCLUDE_PATH}/../lib" 13 31 "$ENV{ProgramFiles}/Tcl/Lib" 14 32 "C:/Program Files/Tcl/lib" 15 33 "C:/Tcl/lib" 34 [HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.4;Root]/lib 35 [HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.3;Root]/lib 36 [HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.2;Root]/lib 37 [HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.0;Root]/lib 38 /usr/lib 39 /usr/local/lib 40 /usr/pack/tcltk-8.4.9.linux-mo/lib 16 41 ../libs/tcl8.5.2/win 42 ../libs/tcl8.5.2/unix 43 ../libs/tcl8.5.2/macosx 17 44 ) 18 45 19 46 FIND_LIBRARY(TCL_LIBRARY 20 NAMES tcl tcl85 tcl8 4 tcl8.4 tcl83 tcl8.3 tcl82 tcl8.2 tcl80 tcl8.047 NAMES tcl tcl85 tcl8.5 tcl84 tcl8.4 tcl83 tcl8.3 tcl82 tcl8.2 tcl80 tcl8.0 21 48 PATHS ${TCLTK_POSSIBLE_LIB_PATHS} 22 49 ) 23 50 51 FIND_LIBRARY(TCL_LIBRARY_DEBUG 52 NAMES tcld tcl85d tcl8.5d tcl84d tcl8.4d tcl83d tcl8.3d tcl82d tcl8.2d tcl80d tcl8.0d 53 PATHS ${TCLTK_POSSIBLE_LIB_PATHS} 54 ) 55 56 FIND_LIBRARY(TCL_STUB_LIBRARY 57 NAMES tclstub tclstub84 tclstub8.4 tclstub83 tclstub8.3 tclstub82 tclstub8.2 tclstub80 tclstub8.0 58 PATHS ${TCLTK_POSSIBLE_LIB_PATHS} 59 ) 60 61 FIND_LIBRARY(TCL_STUB_LIBRARY_DEBUG 62 NAMES tclstubd tclstub84d tclstub8.4d tclstub83d tclstub8.3d tclstub82d tclstub8.2d tclstub80d tclstub8.0d 63 PATHS ${TCLTK_POSSIBLE_LIB_PATHS} 64 ) 65 66 FIND_LIBRARY(TK_LIBRARY 67 NAMES tk tk84 tk8.4 tk83 tk8.3 tk82 tk8.2 tk80 tk8.0 68 PATHS ${TCLTK_POSSIBLE_LIB_PATHS} 69 ) 70 71 FIND_LIBRARY(TK_LIBRARY_DEBUG 72 NAMES tkd tk84d tk8.4d tk83d tk8.3d tk82d tk8.2d tk80d tk8.0d 73 PATHS ${TCLTK_POSSIBLE_LIB_PATHS} 74 ) 75 76 FIND_LIBRARY(TK_STUB_LIBRARY 77 NAMES tkstub tkstub84 tkstub8.4 tkstub83 tkstub8.3 tkstub82 tkstub8.2 tkstub80 tkstub8.0 78 PATHS ${TCLTK_POSSIBLE_LIB_PATHS} 79 ) 80 81 FIND_LIBRARY(TK_STUB_LIBRARY_DEBUG 82 NAMES tkstubd tkstub84d tkstub8.4d tkstub83d tkstub8.3d tkstub82d tkstub8.2d tkstub80d tkstub8.0d 83 PATHS ${TCLTK_POSSIBLE_LIB_PATHS} 84 ) 85 86 CMAKE_FIND_FRAMEWORKS(Tcl) 87 CMAKE_FIND_FRAMEWORKS(Tk) 88 89 SET(TCL_FRAMEWORK_INCLUDES) 90 IF(Tcl_FRAMEWORKS) 91 IF(NOT TCL_INCLUDE_PATH) 92 FOREACH(dir ${Tcl_FRAMEWORKS}) 93 SET(TCL_FRAMEWORK_INCLUDES ${TCL_FRAMEWORK_INCLUDES} ${dir}/Headers) 94 ENDFOREACH(dir) 95 ENDIF(NOT TCL_INCLUDE_PATH) 96 ENDIF(Tcl_FRAMEWORKS) 97 98 SET(TK_FRAMEWORK_INCLUDES) 99 IF(Tk_FRAMEWORKS) 100 IF(NOT TK_INCLUDE_PATH) 101 FOREACH(dir ${Tk_FRAMEWORKS}) 102 SET(TK_FRAMEWORK_INCLUDES ${TK_FRAMEWORK_INCLUDES} 103 ${dir}/Headers ${dir}/PrivateHeaders) 104 ENDFOREACH(dir) 105 ENDIF(NOT TK_INCLUDE_PATH) 106 ENDIF(Tk_FRAMEWORKS) 107 24 108 GET_FILENAME_COMPONENT(TCL_LIBRARY_PATH "${TCL_LIBRARY}" PATH) 109 GET_FILENAME_COMPONENT(TK_LIBRARY_PATH "${TK_LIBRARY}" PATH) 25 110 26 111 SET (TCLTK_POSSIBLE_INCLUDE_PATHS 112 ${TCL_TCLSH_PATH}/../include 113 ${TK_WISH_PATH}/../include 114 "${TCL_LIBRARY_PATH}/../include" 115 "${TK_LIBRARY_PATH}/../include" 116 [HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.4;Root]/include 117 [HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.3;Root]/include 118 [HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.2;Root]/include 119 [HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.0;Root]/include 120 "$ENV{ProgramFiles}/Tcl/include" 121 "C:/Program Files/Tcl/include" 122 C:/Tcl/include 27 123 /usr/include 28 124 /usr/local/include … … 31 127 /usr/include/tcl8.2 32 128 /usr/include/tcl8.0 33 "$ENV{ProgramFiles}/Tcl/include"34 "C:/Program Files/Tcl/include"35 C:/Tcl/include36 ../libs/tcl8.5.2/generic37 129 ) 38 130 … … 40 132 ${TCL_FRAMEWORK_INCLUDES} ${TCLTK_POSSIBLE_INCLUDE_PATHS} 41 133 ) 134 135 FIND_PATH(TK_INCLUDE_PATH tk.h 136 ${TK_FRAMEWORK_INCLUDES} ${TCLTK_POSSIBLE_INCLUDE_PATHS} 137 ) 138 139 IF (WIN32) 140 FIND_PATH(TK_INTERNAL_PATH tkWinInt.h 141 ${TCLTK_POSSIBLE_INCLUDE_PATHS} 142 ) 143 MARK_AS_ADVANCED(TK_INTERNAL_PATH) 144 ENDIF(WIN32) 145 146 MARK_AS_ADVANCED( 147 TCL_TCLSH_PATH 148 TK_WISH_PATH 149 TCL_INCLUDE_PATH 150 TK_INCLUDE_PATH 151 TCL_LIBRARY 152 TCL_LIBRARY_DEBUG 153 TK_LIBRARY 154 TK_LIBRARY_DEBUG 155 TCL_STUB_LIBRARY 156 TCL_STUB_LIBRARY_DEBUG 157 TK_STUB_LIBRARY 158 TK_STUB_LIBRARY 159 TK_STUB_LIBRARY_DEBUG 160 ) 42 161 43 162 IF(TCL_INCLUDE_PATH)
Note: See TracChangeset
for help on using the changeset viewer.