|
From: <ai...@us...> - 2013-11-22 21:01:30
|
Revision: 12742
http://sourceforge.net/p/plplot/code/12742
Author: airwin
Date: 2013-11-22 21:01:27 +0000 (Fri, 22 Nov 2013)
Log Message:
-----------
The tkwin device does make sense when dynamic devices are not used
since "package require Plplotter" dynamically loads libplplotd (which
contains all the tkwin code in this case) rather than the tkwin
device. Therefore revert most of the previous change. The result
is only two changes from revision 12719; (1) tclMain.c and tkMain.c are
dropped from the code that is included in libplotd when dynamic
devices are not enabled and (2) tkwin_LINK_FLAGS includes the
stubs versions of libtcl and libtk when USE_TCL_TK_STUBS is ON.
Revision Links:
--------------
http://sourceforge.net/p/plplot/code/12719
Modified Paths:
--------------
trunk/cmake/modules/tk.cmake
Modified: trunk/cmake/modules/tk.cmake
===================================================================
--- trunk/cmake/modules/tk.cmake 2013-11-22 18:57:31 UTC (rev 12741)
+++ trunk/cmake/modules/tk.cmake 2013-11-22 21:01:27 UTC (rev 12742)
@@ -54,16 +54,6 @@
endif(PLD_tk OR PLD_ntk OR PLD_tkwin)
endif(NOT ENABLE_tk)
-# tkwin "device" (the shared object dynamically loaded by the
-# "package require Plplotter" command from a Tk wish environment) only
-# makes sense for the case of dynamical devices.
-
-if(NOT ENABLE_DYNDRIVERS)
- message(STATUS "WARNING: ENABLE_DYNDRIVERS OFF. Setting PLD_tkwin OFF.")
- set(PLD_tkwin OFF CACHE BOOL "Enable tkwin device" FORCE)
-endif(NOT ENABLE_DYNDRIVERS)
-
-
# Transform TK_INCLUDE_PATH (which is a list) to blank-delimited flag form.
string(REGEX REPLACE ";" " -I" TKLIB_COMPILE_FLAGS "-I${TK_INCLUDE_PATH}")
@@ -128,4 +118,35 @@
${CMAKE_SOURCE_DIR}/bindings/tk-x-plat/Plplotter_Init.c
${CMAKE_SOURCE_DIR}/bindings/tk-x-plat/plplotter.c
)
+ if(NOT ENABLE_DYNDRIVERS AND NOT PLD_tk)
+ # All source that is in libplplottcltk
+ set(
+ tkwin_SOURCE
+ ${tkwin_SOURCE}
+ ${CMAKE_SOURCE_DIR}/bindings/tcl/tclAPI.c
+ ${CMAKE_SOURCE_DIR}/bindings/tk/Pltk_Init.c
+ ${CMAKE_SOURCE_DIR}/bindings/tk/plframe.c
+ ${CMAKE_SOURCE_DIR}/bindings/tk/plr.c
+ ${CMAKE_SOURCE_DIR}/bindings/tk/tcpip.c
+ )
+ # All source that is in libtclmatrix
+ set(
+ tkwin_SOURCE
+ ${tkwin_SOURCE}
+ ${CMAKE_SOURCE_DIR}/bindings/tcl/tclMatrix.c
+ ${CMAKE_SOURCE_DIR}/bindings/tcl/matrixInit.c
+ )
+ if(ENABLE_itcl)
+ set(tkwin_COMPILE_FLAGS
+ "${tkwin_COMPILE_FLAGS} -I${ITCL_INCLUDE_PATH}"
+ )
+ set(DRIVERS_LINK_FLAGS ${DRIVERS_LINK_FLAGS} ${ITCL_LIBRARY})
+ endif(ENABLE_itcl)
+ if(ENABLE_itk)
+ set(tkwin_COMPILE_FLAGS
+ "${tkwin_COMPILE_FLAGS} -I${ITK_INCLUDE_PATH}"
+ )
+ set(DRIVERS_LINK_FLAGS ${DRIVERS_LINK_FLAGS} ${ITK_LIBRARY})
+ endif(ENABLE_itk)
+ endif(NOT ENABLE_DYNDRIVERS AND NOT PLD_tk)
endif(PLD_tkwin)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|