1 #-----------------------------------------------------------------------------
2 # VTK GDCM Reader subdir
3 # Rebuild gdcm whenever a file starting with vtk* is modified
4 INCLUDE_REGULAR_EXPRESSION("^vtk.*$")
6 #-----------------------------------------------------------------------------
7 # Include the VTK library
8 INCLUDE(${VTK_USE_FILE})
10 # Need gdcm header files
12 ${GDCM_SOURCE_DIR}/src/
16 # Depending on VTK version build more stuff:
17 IF("${VTK_MAJOR_VERSION}" GREATER 4)
21 vtkImageColorViewer.cxx
22 vtkImageMapToWindowLevelColors2.cxx
24 ELSE("${VTK_MAJOR_VERSION}" GREATER 4)
29 ENDIF("${VTK_MAJOR_VERSION}" GREATER 4)
31 #-----------------------------------------------------------------------------
32 # Create vtkgdcm library
33 ADD_LIBRARY(vtkgdcm ${VTKGDCM_LIB_SRCS})
34 TARGET_LINK_LIBRARIES(vtkgdcm
40 IF("${VTK_MAJOR_VERSION}" GREATER 4)
41 TARGET_LINK_LIBRARIES(vtkgdcm
44 ENDIF("${VTK_MAJOR_VERSION}" GREATER 4)
46 #-----------------------------------------------------------------------------
47 SET(vtkgdcmdemo_SOURCES
50 ADD_EXECUTABLE(vtkgdcmdemo ${vtkgdcmdemo_SOURCES})
51 TARGET_LINK_LIBRARIES(vtkgdcmdemo
57 #-----------------------------------------------------------------------------
61 ADD_EXECUTABLE(Bmp2Dcm ${Bmp2Dcm_SOURCES})
62 TARGET_LINK_LIBRARIES(Bmp2Dcm
68 #-----------------------------------------------------------------------------
69 SET(vtkgdcmViewer_SOURCES
73 # let's do some APPLE/WIN32 magic here
75 # SET(GUI_EXECUTABLE WIN32)
79 SET(GUI_EXECUTABLE MACOSX_BUNDLE)
82 SET(GUI_EXECUTABLE MACOSX_BUNDLE)
84 # when using X11 on Apple you don't need this...
87 ADD_EXECUTABLE(vtkgdcmViewer ${GUI_EXECUTABLE} ${vtkgdcmViewer_SOURCES})
88 TARGET_LINK_LIBRARIES(vtkgdcmViewer
92 ADD_EXECUTABLE(vtkgdcmViewer2 ${GUI_EXECUTABLE} vtkgdcmViewer2.cxx)
93 TARGET_LINK_LIBRARIES(vtkgdcmViewer2
97 ADD_EXECUTABLE(vtkgdcmSerieViewer ${GUI_EXECUTABLE} vtkgdcmSerieViewer.cxx)
98 TARGET_LINK_LIBRARIES(vtkgdcmSerieViewer
102 ADD_EXECUTABLE(vtkgdcmSerieViewer2 ${GUI_EXECUTABLE} vtkgdcmSerieViewer2.cxx)
103 TARGET_LINK_LIBRARIES(vtkgdcmSerieViewer2
109 #-----------------------------------------------------------------------------
110 SET(vtkWriteDicom_SOURCES
113 SET(vtkWriteDicomExtended_SOURCES
114 vtkWriteDicomExtended.cxx
116 ADD_EXECUTABLE(vtkWriteDicom ${vtkWriteDicom_SOURCES})
117 TARGET_LINK_LIBRARIES(vtkWriteDicom
122 ADD_EXECUTABLE(vtkWriteDicomExtended ${vtkWriteDicomExtended_SOURCES})
123 TARGET_LINK_LIBRARIES(vtkWriteDicomExtended
128 #-----------------------------------------------------------------------------
130 IF(NOT GDCM_INSTALL_NO_DEVELOPMENT)
131 INSTALL_FILES(${GDCM_INSTALL_INCLUDE_DIR} FILES vtkGdcmReader.h)
132 INSTALL_FILES(${GDCM_INSTALL_INCLUDE_DIR} FILES vtkGdcmWriter.h)
133 ENDIF(NOT GDCM_INSTALL_NO_DEVELOPMENT)
135 IF(NOT GDCM_INSTALL_NO_LIBRARIES)
136 INSTALL_TARGETS(${GDCM_INSTALL_LIB_DIR} vtkgdcm)
137 INSTALL_TARGETS(${GDCM_INSTALL_BIN_DIR} vtkgdcmViewer)
138 INSTALL_TARGETS(${GDCM_INSTALL_BIN_DIR} vtkgdcmViewer2)
139 INSTALL_TARGETS(${GDCM_INSTALL_BIN_DIR} vtkgdcmSerieViewer)
140 ENDIF(NOT GDCM_INSTALL_NO_LIBRARIES)