]> Creatis software - gdcm.git/blob - vtk/CMakeLists.txt
Fix misstyping
[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 ADD_EXECUTABLE(vtkgdcmSerieViewer2 ${GUI_EXECUTABLE} vtkgdcmSerieViewer2.cxx)
77 TARGET_LINK_LIBRARIES(vtkgdcmSerieViewer2
78   vtkgdcm
79   vtkRendering
80 )
81
82
83 #-----------------------------------------------------------------------------
84 SET(vtkWriteDicom_SOURCES
85   vtkWriteDicom.cxx
86 )
87 SET(vtkWriteDicomExtended_SOURCES
88   vtkWriteDicomExtended.cxx  
89 )
90 ADD_EXECUTABLE(vtkWriteDicom ${vtkWriteDicom_SOURCES})
91 TARGET_LINK_LIBRARIES(vtkWriteDicom
92   vtkgdcm
93   vtkIO
94   vtkRendering
95 )
96 ADD_EXECUTABLE(vtkWriteDicomExtended ${vtkWriteDicomExtended_SOURCES})
97 TARGET_LINK_LIBRARIES(vtkWriteDicomExtended
98   vtkgdcm
99   vtkIO
100   vtkRendering
101 )
102 #-----------------------------------------------------------------------------
103 # Install vtk header
104 IF(NOT GDCM_INSTALL_NO_DEVELOPMENT)
105   INSTALL_FILES(${GDCM_INSTALL_INCLUDE_DIR} FILES vtkGdcmReader.h)
106   INSTALL_FILES(${GDCM_INSTALL_INCLUDE_DIR} FILES vtkGdcmWriter.h)
107 ENDIF(NOT GDCM_INSTALL_NO_DEVELOPMENT)
108
109 IF(NOT GDCM_INSTALL_NO_LIBRARIES)
110   INSTALL_TARGETS(${GDCM_INSTALL_LIB_DIR} vtkgdcm)
111   INSTALL_TARGETS(${GDCM_INSTALL_BIN_DIR} vtkgdcmViewer)
112   INSTALL_TARGETS(${GDCM_INSTALL_BIN_DIR} vtkgdcmViewer2)
113   INSTALL_TARGETS(${GDCM_INSTALL_BIN_DIR} vtkgdcmSerieViewer)
114 ENDIF(NOT GDCM_INSTALL_NO_LIBRARIES)
115