--- /sw/src/vtk-4.2.5-1/VTK/Common/CMakeLists.txt	Fri Dec 19 21:01:24 2003
+++ VTK/Common/CMakeLists.txt	Thu Jan  8 16:31:22 2004
@@ -1,4 +1,18 @@
-SET( Common_SRCS
+SET(KIT Common)
+SET(UKIT COMMON)
+SET(KIT_TCL_LIBS ${TCL_LIBRARY})
+SET(KIT_PYTHON_LIBS)
+SET(KIT_JAVA_LIBS)
+SET(KIT_LIBS)
+
+IF (APPLE)
+  SET(KIT_LIBS ${KIT_LIBS} "-framework AppKit")
+ENDIF (APPLE)
+IF (UNIX)
+  SET(KIT_LIBS ${KIT_LIBS} ${CMAKE_THREAD_LIBS} ${CMAKE_DL_LIBS} -lm)
+ENDIF (UNIX)
+
+SET( Kit_SRCS
 vtkAbstractMapper.cxx
 vtkAbstractTransform.cxx
 vtkActor2D.cxx
@@ -8,6 +22,7 @@
 vtkAssemblyPath.cxx
 vtkAssemblyPaths.cxx
 vtkBitArray.cxx
+vtkBox.cxx
 vtkByteSwap.cxx
 vtkCallbackCommand.cxx
 vtkCell.cxx
@@ -20,6 +35,10 @@
 vtkCollection.cxx
 vtkCollectionIterator.cxx
 vtkCommand.cxx
+vtkCompositeDataIterator.cxx
+vtkCompositeDataSet.cxx
+vtkCompositeDataVisitor.cxx
+vtkCompositeDataCommand.cxx
 vtkContourValues.cxx
 vtkConvexPointSet.cxx
 vtkCoordinate.cxx
@@ -43,6 +62,7 @@
 vtkEmptyCell.cxx
 vtkErrorCode.cxx
 vtkExplicitCell.cxx
+vtkExtentSplitter.cxx
 vtkExtentTranslator.cxx
 vtkFieldData.cxx
 vtkFileOutputWindow.cxx
@@ -53,6 +73,10 @@
 vtkGenericCell.cxx
 vtkHeap.cxx
 vtkHexahedron.cxx
+vtkHierarchicalBoxDataSet.cxx
+vtkHierarchicalBoxVisitor.cxx
+vtkHierarchicalDataSet.cxx
+vtkHierarchicalDataIterator.cxx
 vtkHomogeneousTransform.cxx
 vtkIdList.cxx
 vtkIdListCollection.cxx
@@ -81,6 +105,9 @@
 vtkMatrix4x4.cxx
 vtkMatrixToHomogeneousTransform.cxx
 vtkMatrixToLinearTransform.cxx
+vtkMultiBlockDataIterator.cxx
+vtkMultiBlockDataSet.cxx
+vtkMultiBlockDataVisitor.cxx
 vtkMultiPartExtentTranslator.cxx
 vtkMultiThreader.cxx
 vtkMutexLock.cxx
@@ -119,9 +146,11 @@
 vtkQuad.cxx
 vtkQuadraticEdge.cxx
 vtkQuadraticHexahedron.cxx
+vtkQuadraticPyramid.cxx
 vtkQuadraticQuad.cxx
 vtkQuadraticTetra.cxx
 vtkQuadraticTriangle.cxx
+vtkQuadraticWedge.cxx
 vtkQuadric.cxx
 vtkRectilinearGrid.cxx
 vtkReferenceCount.cxx
@@ -133,9 +162,11 @@
 vtkSmartPointerBase.cxx
 vtkSource.cxx
 vtkSphericalTransform.cxx
+vtkStdString.cxx
 vtkStructuredData.cxx
 vtkStructuredGrid.cxx
 vtkStructuredPoints.cxx
+vtkStructuredVisibilityConstraint.cxx
 vtkTableExtentTranslator.cxx
 vtkTensor.cxx
 vtkTetra.cxx
@@ -145,6 +176,7 @@
 vtkTransformCollection.cxx
 vtkTriangle.cxx
 vtkTriangleStrip.cxx
+vtkUniformGrid.cxx
 vtkUnsignedCharArray.cxx
 vtkUnsignedIntArray.cxx
 vtkUnsignedLongArray.cxx
@@ -162,19 +194,29 @@
 vtkXMLFileOutputWindow.cxx
 )
 
+IF (WIN32)
+  IF (NOT VTK_USE_X)
+    SET(Kit_SRCS ${Kit_SRCS} vtkWin32OutputWindow.cxx)
+  ENDIF (NOT VTK_USE_X)
+ENDIF (WIN32)
 
-# vtkObjectBase is marked ABSTRACT so that instantiators are happy.
 SET_SOURCE_FILES_PROPERTIES(
+# vtkObjectBase is marked ABSTRACT so that instantiators are happy.
 vtkAbstractMapper
 vtkAbstractTransform
 vtkCallbackCommand
 vtkCell
 vtkCell3D
 vtkCommand
+vtkCompositeDataIterator
+vtkCompositeDataSet
+vtkCompositeDataVisitor
+vtkCompositeDataCommand
 vtkDataArray
 vtkDataSet
 vtkExplicitCell
 vtkFunctionSet
+vtkHierarchicalDataSet
 vtkHomogeneousTransform
 vtkImplicitFunction
 vtkInitialValueProblemSolver
@@ -199,121 +241,167 @@
 ABSTRACT
 )
 
-IF (WIN32)
-  SET(Common_SRCS ${Common_SRCS} vtkWin32OutputWindow.cxx)
-ENDIF (WIN32)
-
 SET_SOURCE_FILES_PROPERTIES(
-  vtkCallbackCommand
-  vtkCommand
-  vtkDebugLeaksManager
-  vtkErrorCode
+  vtkCallbackCommand.cxx
+  vtkCommand.cxx
+  vtkDebugLeaksManager.cxx
+  vtkErrorCode.cxx
   vtkIdType.cxx
-  vtkImageIterator
-  vtkImageProgressIterator
-  vtkLargeInteger
+  vtkImageIterator.cxx
+  vtkImageProgressIterator.cxx
+  vtkIndent.cxx
+  vtkLargeInteger.cxx
   vtkOStrStreamWrapper.cxx
   vtkOStreamWrapper.cxx
-  vtkOldStyleCallbackCommand
+  vtkOldStyleCallbackCommand.cxx
   vtkSmartPointerBase.cxx
+  vtkStdString.cxx
+  vtkTimeStamp.cxx
   WRAP_EXCLUDE
 )
 
+SET(Kit_EXTRA_SRCS)
+SET(Kit_EXTRA_CMDS)
+SET(Kit_TCL_EXTRA_SRCS vtkTclUtil.cxx)
+SET(Kit_PYTHON_EXTRA_SRCS vtkPythonUtil.cxx)
+SET(Kit_JAVA_EXTRA_SRCS vtkJavaUtil.cxx)
+
+# -----------------------------------------------------------------
+# Start of common section
+
 # Setup vtkInstantiator registration for this library's classes.
-VTK_MAKE_INSTANTIATOR2(vtkCommonInstantiator CommonInstantiator_SRCS
-                       ${Common_SRCS}
-                       EXPORT_MACRO VTK_COMMON_EXPORT
+VTK_MAKE_INSTANTIATOR2(vtk${KIT}Instantiator KitInstantiator_SRCS
+                       ${Kit_SRCS}
+                       EXPORT_MACRO VTK_${UKIT}_EXPORT
                        HEADER_LOCATION ${VTK_BINARY_DIR})
 
-ADD_LIBRARY(vtkCommon ${Common_SRCS} ${CommonInstantiator_SRCS})
+ADD_LIBRARY(vtk${KIT} ${Kit_SRCS} ${Kit_EXTRA_SRCS} ${KitInstantiator_SRCS})
 
 IF(VTK_APPLE_SHARED_FLAGS_NEEDED)
-  SET_TARGET_PROPERTIES(vtkCommon PROPERTIES LINK_FLAGS "-init _oft_initCom")
+  SET_TARGET_PROPERTIES(vtk${KIT} PROPERTIES LINK_FLAGS "-init _oft_init${KIT}")
 ENDIF(VTK_APPLE_SHARED_FLAGS_NEEDED)
-IF (APPLE)
-  TARGET_LINK_LIBRARIES(vtkCommon "-framework AppKit")
-ENDIF (APPLE)
-
-IF (UNIX)
-  TARGET_LINK_LIBRARIES(vtkCommon ${CMAKE_THREAD_LIBS} ${CMAKE_DL_LIBS} -lm)
-ENDIF (UNIX)
 
 # Allow the user to customize their build with some local options
 #
-INCLUDE (${VTK_BINARY_DIR}/Common/LocalUserOptions.cmake OPTIONAL)
-INCLUDE (${VTK_SOURCE_DIR}/Common/LocalUserOptions.cmake OPTIONAL)
+SET(LOCALUSERMACRODEFINED 0)
+INCLUDE (${VTK_BINARY_DIR}/${KIT}/LocalUserOptions.cmake OPTIONAL)
+INCLUDE (${VTK_SOURCE_DIR}/${KIT}/LocalUserOptions.cmake OPTIONAL)
 
 # if we are wrapping into Tcl then add the library and extra
 # source files
 #
 IF (VTK_WRAP_TCL)
-  VTK_WRAP_TCL2(vtkCommonTCL CommonTCL_SRCS ${Common_SRCS})
-  ADD_LIBRARY(vtkCommonTCL ${CommonTCL_SRCS} vtkTclUtil.cxx)
-  TARGET_LINK_LIBRARIES (vtkCommonTCL ${TCL_LIBRARY} vtkCommon)
-  INSTALL_TARGETS(/lib/vtk vtkCommonTCL)
-  INSTALL_FILES(/include/vtk .h
-    vtkTclUtil
-  )
+  VTK_WRAP_TCL2(vtk${KIT}TCL SOURCES KitTCL_SRCS 
+                ${Kit_SRCS}
+                COMMANDS ${Kit_TCL_EXTRA_CMDS})
+  ADD_LIBRARY(vtk${KIT}TCL ${KitTCL_SRCS} ${Kit_TCL_EXTRA_SRCS})
+  TARGET_LINK_LIBRARIES (vtk${KIT}TCL vtk${KIT} ${KIT_TCL_LIBS})
+  INSTALL_TARGETS(/lib/vtk vtk${KIT}TCL)
 ENDIF (VTK_WRAP_TCL)
 
 # if we are wrapping into Python then add the library and extra
 # source files
 #
 IF (VTK_WRAP_PYTHON)
-  VTK_WRAP_PYTHON2(vtkCommonPython CommonPython_SRCS ${Common_SRCS})
-  ADD_LIBRARY(vtkCommonPython MODULE ${CommonPython_SRCS} vtkPythonUtil.cxx)
+  VTK_WRAP_PYTHON2(vtk${KIT}Python KitPython_SRCS ${Kit_SRCS})
+  IF (APPLE)
+    ADD_LIBRARY(vtk${KIT}PythonD ${KitPython_SRCS} ${Kit_PYTHON_EXTRA_SRCS})
+    ADD_LIBRARY(vtk${KIT}Python MODULE vtk${KIT}PythonInit.cxx)
+    TARGET_LINK_LIBRARIES(vtk${KIT}PythonD vtk${KIT} ${KIT_PYTHON_LIBS} ${PYTHON_LIBRARY})
+    TARGET_LINK_LIBRARIES(vtk${KIT}Python vtk${KIT}PythonD)
+    INSTALL_TARGETS(/lib/vtk vtk${KIT}PythonD)
+  ELSE (APPLE)
+    ADD_LIBRARY(vtk${KIT}Python MODULE ${KitPython_SRCS} ${Kit_PYTHON_EXTRA_SRCS})
+    TARGET_LINK_LIBRARIES (vtk${KIT}Python vtk${KIT} ${KIT_PYTHON_LIBS})
+  ENDIF(APPLE)
   IF(WIN32)
-    TARGET_LINK_LIBRARIES (vtkCommonPython
+    TARGET_LINK_LIBRARIES (vtk${KIT}Python
                            debug ${PYTHON_DEBUG_LIBRARY}
                            optimized ${PYTHON_LIBRARY})
-  ELSE(WIN32)
-    TARGET_LINK_LIBRARIES (vtkCommonPython ${PYTHON_LIBRARY})
   ENDIF(WIN32)
-  TARGET_LINK_LIBRARIES(vtkCommonPython vtkCommon)
-
-  INSTALL_TARGETS(/lib/vtk vtkCommonPython)
-  INSTALL_FILES(/include/vtk .h
-    vtkPythonUtil
-  )
+  INSTALL_TARGETS(/lib/vtk vtk${KIT}Python)
 ENDIF (VTK_WRAP_PYTHON)
 
 # if we are wrapping into Java then add the library and extra
 # source files
 #
 IF (VTK_WRAP_JAVA)
-  VTK_WRAP_JAVA2(vtkCommonJava CommonJava_SRCS ${Common_SRCS})
-  ADD_LIBRARY(vtkCommonJava SHARED ${CommonJava_SRCS} vtkJavaUtil.cxx)
-  TARGET_LINK_LIBRARIES(vtkCommonJava vtkCommon)
-  INSTALL_TARGETS(/lib/vtk vtkCommonJava)
-  INSTALL_FILES(/include/vtk .h
-    vtkJavaUtil
-  )
+  VTK_WRAP_JAVA2(vtk${KIT}Java KitJava_SRCS ${Kit_SRCS})
+  ADD_LIBRARY(vtk${KIT}Java SHARED ${KitJava_SRCS} ${Kit_JAVA_EXTRA_SRCS})
+  TARGET_LINK_LIBRARIES(vtk${KIT}Java vtk${KIT} ${KIT_JAVA_LIBS})
+  INSTALL_TARGETS(/lib/vtk vtk${KIT}Java)
 ENDIF (VTK_WRAP_JAVA)
 
-INSTALL_TARGETS(/lib/vtk vtkCommon)
-INSTALL_FILES(/include/vtk .h ${Common_SRCS}
+TARGET_LINK_LIBRARIES(vtk${KIT} ${KIT_LIBS})
+
+INSTALL_TARGETS(/lib/vtk vtk${KIT})
+INSTALL_FILES(/include/vtk .h ${Kit_SRCS})
+
+VTK_EXPORT_KIT("${KIT}" "${UKIT}" "${Kit_SRCS}")
+
+# If the user defined a custom macro, execute it now and pass in all the srcs
+#
+IF(LOCALUSERMACRODEFINED)
+  LocalUserOptionsMacro( "${Kit_SRCS}"       "${Kit_EXTRA_SRCS}"
+                         "${KitTCL_SRCS}"    "${Kit_TCL_EXTRA_SRCS}"
+                         "${KitJava_SRCS}"   "${Kit_JAVA_EXTRA_SRCS}"
+                         "${KitPython_SRCS}" "${Kit_PYTHON_EXTRA_SRCS}")
+ENDIF(LOCALUSERMACRODEFINED)
+
+# End of common section
+# -----------------------------------------------------------------
+
+INSTALL_FILES(/include/vtk .h
   vtkCellType
+  vtkDataArrayTemplate
+  vtkIOStream
+  vtkIOStreamFwd
   vtkSetGet
+  vtkSmartPointer
   vtkSystemIncludes
   vtkWin32Header
-  vtkSmartPointer
-  vtkIOStream
-  vtkIOStreamFwd
+)
+
+IF(VTK_WRAP_TCL)
+  INSTALL_FILES(/include/vtk .h
+    vtkTcl
+    vtkTclUtil
+    vtkTk
+  )
+ENDIF(VTK_WRAP_TCL)
+IF(VTK_WRAP_PYTHON)
+  INSTALL_FILES(/include/vtk .h
+    vtkPythonUtil
+  )
+  IF (TK_LIBRARY)
+	IF(NOT VTK_USE_COCOA)
+      INSTALL_FILES(/include/vtk .h
+        vtkTcl
+        vtkTk
+       )
+    ENDIF(NOT VTK_USE_COCOA)
+  ENDIF (TK_LIBRARY)
+ENDIF(VTK_WRAP_PYTHON)
+IF(VTK_WRAP_JAVA)
+  INSTALL_FILES(/include/vtk .h
+    vtkJavaUtil
   )
+ENDIF(VTK_WRAP_JAVA)
 
 INSTALL_FILES(/include/vtk .txx
+  vtkDataArrayTemplate
   vtkImageIterator
   vtkImageProgressIterator
 )
 
 INSTALL_FILES(/lib/vtk/testing FILES
-              ${VTK_SOURCE_DIR}/Common/Testing/HeaderTesting.py
-              ${VTK_SOURCE_DIR}/Common/Testing/Tcl/FindString.tcl
-              ${VTK_SOURCE_DIR}/Common/Testing/Tcl/PrintSelfCheck.tcl
-              ${VTK_SOURCE_DIR}/Common/Testing/Tcl/rtImageTest.tcl)
+              ${VTK_SOURCE_DIR}/${KIT}/Testing/HeaderTesting.py
+              ${VTK_SOURCE_DIR}/${KIT}/Testing/Tcl/FindString.tcl
+              ${VTK_SOURCE_DIR}/${KIT}/Testing/Tcl/PrintSelfCheck.tcl
+              ${VTK_SOURCE_DIR}/${KIT}/Testing/Tcl/rtImageTest.tcl)
 INSTALL_FILES(/include/vtk FILES
-              ${VTK_SOURCE_DIR}/Common/Testing/Cxx/vtkRegressionTestImage.h)
+              ${VTK_SOURCE_DIR}/${KIT}/Testing/Cxx/vtkRegressionTestImage.h)
 IF(VTK_USE_PARALLEL)
   INSTALL_FILES(/lib/vtk/testing FILES
-                ${VTK_SOURCE_DIR}/Common/Testing/Tcl/prtImageTest.tcl)
+                ${VTK_SOURCE_DIR}/${KIT}/Testing/Tcl/prtImageTest.tcl)
 ENDIF(VTK_USE_PARALLEL)
