]> Creatis software - gdcm.git/blobdiff - vtk/CMakeLists.txt
* FIX : on X, the python part is correctly installed. All files are
[gdcm.git] / vtk / CMakeLists.txt
index a7f2b73dd17fd9bd025f89d1c08ee7548b179697..bf3f5532779998cc76b61d4f2e3c6ca50aa8df37 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
 )
 
 #-----------------------------------------------------------------------------
@@ -45,9 +48,29 @@ TARGET_LINK_LIBRARIES(vtkgdcmViewer
   vtkgdcm
   vtkRendering
 )
+ADD_EXECUTABLE(vtkgdcmViewer2 vtkgdcmViewer2.cxx)
+TARGET_LINK_LIBRARIES(vtkgdcmViewer2
+  vtkgdcm
+  vtkRendering
+)
 
+#-----------------------------------------------------------------------------
+SET(vtkWriteDicom_SOURCES
+  vtkWriteDicom.cxx
+)
+ADD_EXECUTABLE(vtkWriteDicom ${vtkWriteDicom_SOURCES})
+TARGET_LINK_LIBRARIES(vtkWriteDicom
+  vtkgdcm
+  vtkIO
+  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)