From: Alan W. I. <ai...@us...> - 2006-10-31 21:14:32
|
Update of /cvsroot/plplot/plplot/cmake/modules In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29586 Modified Files: tcl-related.cmake Log Message: Include the X headers and libraries in the Tk headers and libraries. This change appears to be necessary for the Mac OS X platform. Improve Tcl/Tk-related messages and option handling. Index: tcl-related.cmake =================================================================== RCS file: /cvsroot/plplot/plplot/cmake/modules/tcl-related.cmake,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- tcl-related.cmake 23 Sep 2006 04:13:37 -0000 1.6 +++ tcl-related.cmake 31 Oct 2006 21:14:30 -0000 1.7 @@ -68,6 +68,8 @@ ) endif(TCL_FOUND) if(TCL_FOUND AND TCL_TCLSH) + message(STATUS "TCL_INCLUDE_PATH = ${TCL_INCLUDE_PATH}") + message(STATUS "TCL_LIBRARY = ${TCL_LIBRARY}") if(ENABLE_itcl) message(STATUS "Looking for itcl.h") find_path(ITCL_INCLUDE_PATH itcl.h ${TCL_INCLUDE_PATH}) @@ -95,6 +97,10 @@ set(ENABLE_itcl OFF CACHE BOOL "Enable incr Tcl interface code" FORCE) endif(ITCL_INCLUDE_PATH) endif(ENABLE_itcl) + if(ENABLE_itcl) + message(STATUS "ITCL_INCLUDE_PATH = ${ITCL_INCLUDE_PATH}") + message(STATUS "ITCL_LIBRARY = ${ITCL_LIBRARY}") + endif(ENABLE_itcl) # ------------------------------------------------------------------------ # figure out how to build tclIndex # ------------------------------------------------------------------------ @@ -104,6 +110,26 @@ else(ENABLE_itcl) set(MKTCLINDEX_ARGS "-tcl") endif(ENABLE_itcl) + if(ENABLE_tk AND NOT X11_FOUND) + message(STATUS "WARNING: X11 not found, disabling Tk interface code") + set(ENABLE_tk OFF CACHE BOOL "Enable Tk interface code" FORCE) + endif(ENABLE_tk AND NOT X11_FOUND) + if(ENABLE_tk) + set(TK_INCLUDE_PATH ${TK_INCLUDE_PATH} ${X11_INCLUDE_DIR}) + set( + TK_LIBRARY + ${TK_LIBRARY} + -L${X11_LIBRARY_DIR} + ${X11_LIBRARIES} + ) + message(STATUS "TK_INCLUDE_PATH = ${TK_INCLUDE_PATH}") + message(STATUS "TK_LIBRARY = ${TK_LIBRARY}") + else(ENABLE_tk) + message(STATUS + "WARNING: Because Tk is disabled must disable incr Tk as well" + ) + set(ENABLE_itk OFF CACHE BOOL "Enable incr Tk interface code" FORCE) + endif(ENABLE_tk) if(ENABLE_itk) message(STATUS "Looking for itk.h") find_path(ITK_INCLUDE_PATH itk.h ${TK_INCLUDE_PATH}) @@ -129,8 +155,12 @@ set(ENABLE_itk OFF CACHE BOOL "Enable incr Tk interface code" FORCE) endif(ITK_INCLUDE_PATH) endif(ENABLE_itk) + if(ENABLE_itk) + message(STATUS "ITK_INCLUDE_PATH = ${ITK_INCLUDE_PATH}") + message(STATUS "ITK_LIBRARY = ${ITK_LIBRARY}") + endif(ENABLE_itk) else(TCL_FOUND AND TCL_TCLSH) - message(STATUS "Disabling everything that is Tcl/Tk related") + message(STATUS "WARNING: Disabling everything that is Tcl/Tk related") set(ENABLE_tcl OFF CACHE BOOL "Enable Tcl bindings" FORCE) set(ENABLE_itcl OFF CACHE BOOL "Enable incr Tcl interface code" FORCE) set(ENABLE_tk OFF CACHE BOOL "Enable Tk interface code" FORCE) @@ -138,7 +168,7 @@ endif(TCL_FOUND AND TCL_TCLSH) else(ENABLE_tcl) message(STATUS - "ENABLE_tcl is off so disabling everything else that " + "ENABLE_tcl is OFF so disabling everything else that " "is Tcl/Tk related" ) set(ENABLE_itcl OFF CACHE BOOL "Enable incr Tcl interface code" FORCE) |