Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 1161


Ignore:
Timestamp:
Apr 24, 2008, 2:11:23 PM (17 years ago)
Author:
FelixSchulthess
Message:

changed findtcl.cmake

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/console/cmake/FindTCL.cmake

    r1151 r1161  
    44# the library is. This code sets the following variables:
    55#  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
    69#  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
     19INCLUDE(CMakeFindFrameworks)
     20INCLUDE(FindTclsh)
     21INCLUDE(FindWish)
    722
    823GET_FILENAME_COMPONENT(TCL_TCLSH_PATH "${TCL_TCLSH}" PATH)
     24GET_FILENAME_COMPONENT(TK_WISH_PATH "${TK_WISH}" PATH)
    925
    1026SET (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"
    1331  "$ENV{ProgramFiles}/Tcl/Lib"
    1432  "C:/Program Files/Tcl/lib"
    1533  "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
    1641  ../libs/tcl8.5.2/win
     42  ../libs/tcl8.5.2/unix
     43  ../libs/tcl8.5.2/macosx
    1744)
    1845
    1946FIND_LIBRARY(TCL_LIBRARY
    20   NAMES tcl tcl85 tcl84 tcl8.4 tcl83 tcl8.3 tcl82 tcl8.2 tcl80 tcl8.0
     47  NAMES tcl tcl85 tcl8.5 tcl84 tcl8.4 tcl83 tcl8.3 tcl82 tcl8.2 tcl80 tcl8.0
    2148  PATHS ${TCLTK_POSSIBLE_LIB_PATHS}
    2249)
    2350
     51FIND_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
     56FIND_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
     61FIND_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
     66FIND_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
     71FIND_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
     76FIND_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
     81FIND_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
     86CMAKE_FIND_FRAMEWORKS(Tcl)
     87CMAKE_FIND_FRAMEWORKS(Tk)
     88
     89SET(TCL_FRAMEWORK_INCLUDES)
     90IF(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)
     96ENDIF(Tcl_FRAMEWORKS)
     97
     98SET(TK_FRAMEWORK_INCLUDES)
     99IF(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)
     106ENDIF(Tk_FRAMEWORKS)
     107
    24108GET_FILENAME_COMPONENT(TCL_LIBRARY_PATH "${TCL_LIBRARY}" PATH)
     109GET_FILENAME_COMPONENT(TK_LIBRARY_PATH "${TK_LIBRARY}" PATH)
    25110
    26111SET (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
    27123  /usr/include
    28124  /usr/local/include
     
    31127  /usr/include/tcl8.2
    32128  /usr/include/tcl8.0
    33   "$ENV{ProgramFiles}/Tcl/include"
    34   "C:/Program Files/Tcl/include"
    35   C:/Tcl/include
    36   ../libs/tcl8.5.2/generic
    37129)
    38130
     
    40132  ${TCL_FRAMEWORK_INCLUDES} ${TCLTK_POSSIBLE_INCLUDE_PATHS}
    41133)
     134
     135FIND_PATH(TK_INCLUDE_PATH tk.h
     136  ${TK_FRAMEWORK_INCLUDES} ${TCLTK_POSSIBLE_INCLUDE_PATHS}
     137)
     138
     139IF (WIN32)
     140  FIND_PATH(TK_INTERNAL_PATH tkWinInt.h
     141    ${TCLTK_POSSIBLE_INCLUDE_PATHS}
     142  )
     143  MARK_AS_ADVANCED(TK_INTERNAL_PATH)
     144ENDIF(WIN32)
     145
     146MARK_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  )
    42161
    43162IF(TCL_INCLUDE_PATH)
Note: See TracChangeset for help on using the changeset viewer.