]> Creatis software - gdcm.git/blob - vtk/CMakeLists.txt
COMP: Need to include sys/stat for stat function + IS_DIR
[gdcm.git] / vtk / CMakeLists.txt
1 #-----------------------------------------------------------------------------
2 # VTK GDCM Reader subdir
3 # Rebuild gdcm whenever a file starting with vtk* is modified
4 INCLUDE_REGULAR_EXPRESSION("^vtk.*$")
5
6 #-----------------------------------------------------------------------------
7 # Include the VTK library
8 INCLUDE(${VTK_USE_FILE})
9
10 # Need gdcm header files
11 INCLUDE_DIRECTORIES(
12   ${GDCM_SOURCE_DIR}/src/
13   ${GDCM_BINARY_DIR}/
14 )
15
16 SET(VTKGDCM_LIB_SRCS
17   vtkGdcmReader.cxx
18   vtkGdcmWriter.cxx
19 )
20
21 #-----------------------------------------------------------------------------
22 # Create vtkgdcm library
23 ADD_LIBRARY(vtkgdcm ${VTKGDCM_LIB_SRCS})
24 TARGET_LINK_LIBRARIES(vtkgdcm
25   gdcm
26   vtkCommon
27   vtkIO
28   vtkFiltering
29 )
30
31 #-----------------------------------------------------------------------------
32 SET(vtkgdcmdemo_SOURCES
33   vtkGdcmDemo.cxx
34 )
35 ADD_EXECUTABLE(vtkgdcmdemo ${vtkgdcmdemo_SOURCES})
36 TARGET_LINK_LIBRARIES(vtkgdcmdemo
37   vtkgdcm
38   vtkGraphics
39   vtkRendering
40 )
41
42 #-----------------------------------------------------------------------------
43 SET(vtkgdcmViewer_SOURCES
44   vtkgdcmViewer.cxx
45 )
46 ADD_EXECUTABLE(vtkgdcmViewer ${vtkgdcmViewer_SOURCES})
47 TARGET_LINK_LIBRARIES(vtkgdcmViewer
48   vtkgdcm
49   vtkRendering
50 )
51 ADD_EXECUTABLE(vtkgdcmViewer2 vtkgdcmViewer2.cxx)
52 TARGET_LINK_LIBRARIES(vtkgdcmViewer2
53   vtkgdcm
54   vtkRendering
55 )
56
57 #-----------------------------------------------------------------------------
58 SET(vtkWriteDicom_SOURCES
59   vtkWriteDicom.cxx
60 )
61 ADD_EXECUTABLE(vtkWriteDicom ${vtkWriteDicom_SOURCES})
62 TARGET_LINK_LIBRARIES(vtkWriteDicom
63   vtkgdcm
64   vtkIO
65   vtkRendering
66 )
67
68 #-----------------------------------------------------------------------------
69 # Install vtk header
70 INSTALL_FILES(/include FILES vtkGdcmReader.h)
71 INSTALL_FILES(/include FILES vtkGdcmWriter.h)
72
73 INSTALL_TARGETS(/lib/ vtkgdcm)
74