]> Creatis software - gdcm.git/blobdiff - vtk/CMakeLists.txt
Add SetCoherentFileList() method, to use the 'file ordering' of
[gdcm.git] / vtk / CMakeLists.txt
index c3b68cc298440fa2b1004edd1fa51f10c72dabda..41023aa2427aaa8895589e59c798efbe0bd06be3 100644 (file)
@@ -1,5 +1,7 @@
 #-----------------------------------------------------------------------------
 # VTK GDCM Reader subdir
+# Rebuild gdcm whenever a file starting with vtk* is modified
+INCLUDE_REGULAR_EXPRESSION("^vtk.*$")
 
 #-----------------------------------------------------------------------------
 # Include the VTK library
@@ -13,6 +15,7 @@ INCLUDE_DIRECTORIES(
 
 SET(VTKGDCM_LIB_SRCS
   vtkGdcmReader.cxx
+  vtkGdcmWriter.cxx
 )
 
 #-----------------------------------------------------------------------------
@@ -40,27 +43,49 @@ TARGET_LINK_LIBRARIES(vtkgdcmdemo
 SET(vtkgdcmViewer_SOURCES
   vtkgdcmViewer.cxx
 )
-ADD_EXECUTABLE(vtkgdcmViewer ${vtkgdcmViewer_SOURCES})
+
+# let's do some APPLE/WIN32 magic here
+#IF(WIN32)
+#  SET(GUI_EXECUTABLE WIN32)
+#ENDIF(WIN32)
+IF(APPLE)
+  IF(VTK_USE_CARBON)
+    SET(GUI_EXECUTABLE MACOSX_BUNDLE)
+  ENDIF(VTK_USE_CARBON)
+  IF(VTK_USE_COCOA)
+    SET(GUI_EXECUTABLE MACOSX_BUNDLE)
+  ENDIF(VTK_USE_COCOA)
+  # when using X11 on Apple you don't need this...
+ENDIF(APPLE)
+
+ADD_EXECUTABLE(vtkgdcmViewer ${GUI_EXECUTABLE} ${vtkgdcmViewer_SOURCES})
 TARGET_LINK_LIBRARIES(vtkgdcmViewer
   vtkgdcm
   vtkRendering
 )
+ADD_EXECUTABLE(vtkgdcmViewer2 ${GUI_EXECUTABLE} vtkgdcmViewer2.cxx)
+TARGET_LINK_LIBRARIES(vtkgdcmViewer2
+  vtkgdcm
+  vtkRendering
+)
 
 #-----------------------------------------------------------------------------
-SET(GdcmToBaseline_SOURCES
-  GdcmToBaseline.cxx
+SET(vtkWriteDicom_SOURCES
+  vtkWriteDicom.cxx
 )
-ADD_EXECUTABLE(GdcmToBaseline ${GdcmToBaseline_SOURCES})
-TARGET_LINK_LIBRARIES(GdcmToBaseline
+ADD_EXECUTABLE(vtkWriteDicom ${vtkWriteDicom_SOURCES})
+TARGET_LINK_LIBRARIES(vtkWriteDicom
   vtkgdcm
   vtkIO
-  vtkImaging
   vtkRendering
 )
 
 #-----------------------------------------------------------------------------
 # Install vtk header
-INSTALL_FILES(/include FILES vtkGdcmReader.h)
+INSTALL_FILES(/include/gdcm FILES vtkGdcmReader.h)
+INSTALL_FILES(/include/gdcm FILES vtkGdcmWriter.h)
 
-INSTALL_TARGETS(/lib/ vtkgdcm)
+INSTALL_TARGETS(/lib/gdcm/ vtkgdcm)
+INSTALL_TARGETS(/bin/ vtkgdcmViewer)
+INSTALL_TARGETS(/bin/ vtkgdcmViewer2)