]> Creatis software - gdcm.git/blob - vtk/CMakeLists.txt
Initialize UserFunction pointer to 0, even for 'deprecated' form of constructor.
[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
47 # let's do some APPLE/WIN32 magic here
48 #IF(WIN32)
49 #  SET(GUI_EXECUTABLE WIN32)
50 #ENDIF(WIN32)
51 IF(APPLE)
52   IF(VTK_USE_CARBON)
53     SET(GUI_EXECUTABLE MACOSX_BUNDLE)
54   ENDIF(VTK_USE_CARBON)
55   IF(VTK_USE_COCOA)
56     SET(GUI_EXECUTABLE MACOSX_BUNDLE)
57   ENDIF(VTK_USE_COCOA)
58   # when using X11 on Apple you don't need this...
59 ENDIF(APPLE)
60
61 ADD_EXECUTABLE(vtkgdcmViewer ${GUI_EXECUTABLE} ${vtkgdcmViewer_SOURCES})
62 TARGET_LINK_LIBRARIES(vtkgdcmViewer
63   vtkgdcm
64   vtkRendering
65 )
66 ADD_EXECUTABLE(vtkgdcmViewer2 ${GUI_EXECUTABLE} vtkgdcmViewer2.cxx)
67 TARGET_LINK_LIBRARIES(vtkgdcmViewer2
68   vtkgdcm
69   vtkRendering
70 )
71 ADD_EXECUTABLE(vtkgdcmSerieViewer ${GUI_EXECUTABLE} vtkgdcmSerieViewer.cxx)
72 TARGET_LINK_LIBRARIES(vtkgdcmSerieViewer
73   vtkgdcm
74   vtkRendering
75 )
76 #-----------------------------------------------------------------------------
77 SET(vtkWriteDicom_SOURCES
78   vtkWriteDicom.cxx
79 )
80 ADD_EXECUTABLE(vtkWriteDicom ${vtkWriteDicom_SOURCES})
81 TARGET_LINK_LIBRARIES(vtkWriteDicom
82   vtkgdcm
83   vtkIO
84   vtkRendering
85 )
86
87 #-----------------------------------------------------------------------------
88 # Install vtk header
89 INSTALL_FILES(/include/gdcm FILES vtkGdcmReader.h)
90 INSTALL_FILES(/include/gdcm FILES vtkGdcmWriter.h)
91
92 INSTALL_TARGETS(/lib/gdcm/ vtkgdcm)
93 INSTALL_TARGETS(/bin/ vtkgdcmViewer)
94 INSTALL_TARGETS(/bin/ vtkgdcmViewer2)
95 INSTALL_TARGETS(/bin/ vtkgdcmSerieViewer)