]> Creatis software - clitk.git/blob - tools/CMakeLists.txt
c2ecc4aa9ff563d3ed067c4d18990a25a6d3dbe1
[clitk.git] / tools / CMakeLists.txt
1 #=========================================================
2 INCLUDE(${PROJECT_SOURCE_DIR}/cmake/common.cmake)
3 #=========================================================
4 #Add your ggo files to this list if they are used by vv
5 FOREACH(clitkTool clitkAffineTransform clitkBinarizeImage clitkImageArithm
6         clitkMedianImageFilter clitkImageConvert clitkImageResample) 
7     WRAP_GGO(${clitkTool}_GGO_C ${clitkTool}.ggo)
8     SET(GGO_C_FILES ${GGO_C_FILES} ${${clitkTool}_GGO_C})
9 ENDFOREACH(clitkTool)
10 ADD_LIBRARY(clitkToolsGgoLib ${GGO_C_FILES})
11
12 #=========================================================
13 #the libraries avoid recompilation for vv, and should be used for generic filters
14 #with long compilation times that are used by vv
15 ADD_LIBRARY(clitkImageConvertLib clitkImageConvertGenericFilter.cxx)
16 ADD_LIBRARY(clitkImageResampleLib clitkImageResampleGenericFilter.cxx)
17
18 IF (CLITK_BUILD_TOOLS)
19     WRAP_GGO(clitkDicomInfo_GGO_C clitkDicomInfo.ggo)
20     ADD_EXECUTABLE(clitkDicomInfo clitkDicomInfo.cxx ${clitkDicomInfo_GGO_C})
21     TARGET_LINK_LIBRARIES(clitkDicomInfo clitkCommon ITKIO) 
22
23     WRAP_GGO(clitkImageInfo_GGO_C clitkImageInfo.ggo)
24     ADD_EXECUTABLE(clitkImageInfo clitkImageInfo.cxx ${clitkImageInfo_GGO_C})
25     TARGET_LINK_LIBRARIES(clitkImageInfo clitkCommon ITKIO)
26
27     ADD_EXECUTABLE(clitkImageConvert clitkImageConvert.cxx ${clitkImageConvert_GGO_C})
28     TARGET_LINK_LIBRARIES(clitkImageConvert clitkImageConvertLib clitkCommon ITKIO)
29
30     # ADD_EXECUTABLE(clitkImageResample clitkImageResample.cxx
31     # ${clitkImageResample_GGO_C})
32     # TARGET_LINK_LIBRARIES(clitkImageResample clitkImageResampleLib clitkCommon ITKIO )
33
34     WRAP_GGO(clitkVFResample_GGO_C clitkImageResample.ggo)
35     ADD_EXECUTABLE(clitkVFResample clitkVFResample.cxx clitkVFResampleGenericFilter.cxx ${clitkVFResample_GGO_C})
36     TARGET_LINK_LIBRARIES(clitkVFResample clitkCommon ITKIO)
37
38     WRAP_GGO(clitkImageCreate_GGO_C clitkImageCreate.ggo)
39     ADD_EXECUTABLE(clitkImageCreate clitkImageCreate.cxx ${clitkImageCreate_GGO_C})
40     TARGET_LINK_LIBRARIES(clitkImageCreate clitkCommon  ITKIO)
41
42     WRAP_GGO(clitkZeroVF_GGO_C clitkZeroVF.ggo)
43     ADD_EXECUTABLE(clitkZeroVF clitkZeroVF.cxx ${clitkZeroVF_GGO_C} clitkZeroVFGenericFilter.cxx)
44     TARGET_LINK_LIBRARIES(clitkZeroVF clitkCommon  ITKIO)
45
46     WRAP_GGO(clitkImageExtractLine_GGO_C clitkImageExtractLine.ggo)
47     ADD_EXECUTABLE(clitkImageExtractLine clitkImageExtractLine.cxx ${clitkImageExtractLine_GGO_C})
48     TARGET_LINK_LIBRARIES(clitkImageExtractLine clitkCommon  ITKIO)
49
50     WRAP_GGO(clitkSplitImage_GGO_C clitkSplitImage.ggo)
51     ADD_EXECUTABLE(clitkSplitImage clitkSplitImage.cxx clitkSplitImageGenericFilter.cxx ${clitkSplitImage_GGO_C})
52     TARGET_LINK_LIBRARIES(clitkSplitImage clitkCommon ITKIO )
53
54     WRAP_GGO(clitkVFMerge_GGO_C clitkVFMerge.ggo)
55     ADD_EXECUTABLE(clitkVFMerge clitkVFMerge.cxx ${clitkVFMerge_GGO_C})
56     TARGET_LINK_LIBRARIES(clitkVFMerge ITKBasicFilters clitkCommon ITKIO)
57
58     WRAP_GGO(clitkWriteDicomSeries_GGO_C clitkWriteDicomSeries.ggo)
59     ADD_EXECUTABLE(clitkWriteDicomSeries clitkWriteDicomSeries.cxx ${clitkWriteDicomSeries_GGO_C})
60     TARGET_LINK_LIBRARIES(clitkWriteDicomSeries clitkCommon ITKIO )
61
62     WRAP_GGO(clitkAverageTemporalDimension_GGO_C clitkAverageTemporalDimension.ggo)
63     ADD_EXECUTABLE(clitkAverageTemporalDimension clitkAverageTemporalDimension.cxx ${clitkAverageTemporalDimension_GGO_C})
64     TARGET_LINK_LIBRARIES(clitkAverageTemporalDimension clitkCommon ITKIO )
65
66     WRAP_GGO(clitkWarpImage_GGO_C clitkWarpImage.ggo)
67     ADD_EXECUTABLE(clitkWarpImage clitkWarpImage.cxx ${clitkWarpImage_GGO_C} clitkWarpImageGenericFilter.cxx)
68     TARGET_LINK_LIBRARIES(clitkWarpImage ITKBasicFilters clitkCommon ITKIO)
69
70     WRAP_GGO(clitkInvertVF_GGO_C clitkInvertVF.ggo)
71     ADD_EXECUTABLE(clitkInvertVF clitkInvertVF.cxx ${clitkInvertVF_GGO_C})
72     TARGET_LINK_LIBRARIES(clitkInvertVF clitkCommon ITKIO )
73
74     ADD_EXECUTABLE(clitkAffineTransform clitkAffineTransform.cxx ${clitkAffineTransform_GGO_C})
75     TARGET_LINK_LIBRARIES(clitkAffineTransform clitkCommon ITKIO )
76
77     WRAP_GGO(clitkSetBackground_GGO_C clitkSetBackground.ggo)
78     ADD_EXECUTABLE(clitkSetBackground clitkSetBackground.cxx clitkSetBackgroundGenericFilter.cxx ${clitkSetBackground_GGO_C})
79     TARGET_LINK_LIBRARIES(clitkSetBackground clitkCommon ITKIO)
80
81     WRAP_GGO(clitkGuerreroVentilation_GGO_C clitkGuerreroVentilation.ggo)
82     ADD_EXECUTABLE(clitkGuerreroVentilation clitkGuerreroVentilation.cxx clitkGuerreroVentilationGenericFilter.cxx ${clitkGuerreroVentilation_GGO_C})
83     TARGET_LINK_LIBRARIES(clitkGuerreroVentilation clitkCommon ITKIO)
84
85     ADD_EXECUTABLE(clitkImageArithm clitkImageArithm.cxx ${clitkImageArithm_GGO_C})
86     TARGET_LINK_LIBRARIES(clitkImageArithm clitkCommon ITKIO )
87
88     WRAP_GGO(clitkUnsharpMask_GGO_C clitkUnsharpMask.ggo)
89     ADD_EXECUTABLE(clitkUnsharpMask clitkUnsharpMask.cxx ${clitkUnsharpMask_GGO_C})
90     TARGET_LINK_LIBRARIES(clitkUnsharpMask clitkCommon ITKIO ) 
91
92     WRAP_GGO(clitkFooImage_GGO_C clitkFooImage.ggo)
93     ADD_EXECUTABLE(clitkFooImage clitkFooImage.cxx ${clitkFooImage_GGO_C})
94     TARGET_LINK_LIBRARIES(clitkFooImage clitkCommon ITKIO ) 
95
96     ADD_EXECUTABLE(clitkMedianImageFilter clitkMedianImageFilter.cxx ${clitkMedianImageFilter_GGO_C})
97     TARGET_LINK_LIBRARIES(clitkMedianImageFilter clitkCommon ITKIO ITKBasicFilters )
98
99     WRAP_GGO(clitkResampleImage_GGO_C clitkResampleImage.ggo)
100     ADD_EXECUTABLE(clitkResampleImage clitkResampleImage.cxx clitkResampleImageGenericFilter.cxx ${clitkResampleImage_GGO_C})
101     TARGET_LINK_LIBRARIES(clitkResampleImage clitkCommon ITKIO)
102
103     WRAP_GGO(clitkMinMaxMask_GGO_C clitkMinMaxMask.ggo)
104     ADD_EXECUTABLE(clitkMinMaxMask clitkMinMaxMask.cxx ${clitkMinMaxMask_GGO_C})
105     TARGET_LINK_LIBRARIES(clitkMinMaxMask clitkCommon ITKIO  )
106
107     WRAP_GGO(clitkAutoCrop_GGO_C clitkAutoCrop.ggo)
108     ADD_EXECUTABLE(clitkAutoCrop clitkAutoCrop.cxx ${clitkAutoCrop_GGO_C})
109     TARGET_LINK_LIBRARIES(clitkAutoCrop clitkCommon ITKIO )
110
111     WRAP_GGO(clitkDicomRTStruct2BinaryImage_GGO_C clitkDicomRTStruct2BinaryImage.ggo)
112     ADD_EXECUTABLE(clitkDicomRTStruct2BinaryImage clitkDicomRT_ROI_ConvertToImageFilter.cxx clitkDicomRTStruct2BinaryImage.cxx ${clitkDicomRTStruct2BinaryImage_GGO_C})
113     TARGET_LINK_LIBRARIES(clitkDicomRTStruct2BinaryImage ITKCommon clitkDicomRTStruct clitkCommon ITKIO QVTK)
114
115     WRAP_GGO(clitkImageLog_GGO_C clitkImageLog.ggo)
116     ADD_EXECUTABLE(clitkImageLog clitkImageLog.cxx ${clitkImageLog_GGO_C})
117     TARGET_LINK_LIBRARIES(clitkImageLog  ITKIO clitkCommon)
118
119     WRAP_GGO(clitkFilter_GGO_C clitkFilter.ggo)
120     ADD_EXECUTABLE(clitkFilter clitkFilter.cxx clitkFilterGenericFilter.cxx ${clitkFilter_GGO_C})
121     TARGET_LINK_LIBRARIES(clitkFilter ITKIO clitkCommon)
122
123     WRAP_GGO(clitkConeBeamProjectImage_GGO_C clitkConeBeamProjectImage.ggo)
124     ADD_EXECUTABLE(clitkConeBeamProjectImage clitkConeBeamProjectImage.cxx clitkConeBeamProjectImageGenericFilter.cxx ${clitkConeBeamProjectImage_GGO_C})
125     TARGET_LINK_LIBRARIES(clitkConeBeamProjectImage  ITKIO clitkCommon )
126
127     WRAP_GGO(clitkComposeVF_GGO_C clitkComposeVF.ggo)
128     ADD_EXECUTABLE(clitkComposeVF clitkComposeVFGenericFilter.cxx clitkComposeVF.cxx ${clitkComposeVF_GGO_C})
129     TARGET_LINK_LIBRARIES(clitkComposeVF ITKBasicFilters ITKIO clitkCommon)
130
131     WRAP_GGO(clitkMergeSequence_GGO_C clitkMergeSequence.ggo)
132     ADD_EXECUTABLE(clitkMergeSequence clitkMergeSequence.cxx clitkMergeSequenceGenericFilter.cxx ${clitkMergeSequence_GGO_C})
133     TARGET_LINK_LIBRARIES(clitkMergeSequence ITKIO clitkCommon)
134
135     WRAP_GGO(clitkBackProjectImage_GGO_C clitkBackProjectImage.ggo)
136     ADD_EXECUTABLE(clitkBackProjectImage clitkBackProjectImage.cxx clitkBackProjectImageGenericFilter.cxx ${clitkBackProjectImage_GGO_C})
137     TARGET_LINK_LIBRARIES(clitkBackProjectImage ITKIO clitkCommon )
138
139     WRAP_GGO(clitkCropImage_GGO_C clitkCropImage.ggo)
140     ADD_EXECUTABLE(clitkCropImage clitkCropImage.cxx clitkCropImageGenericFilter.cxx ${clitkCropImage_GGO_C})
141     TARGET_LINK_LIBRARIES(clitkCropImage clitkCommon ITKIO)
142
143 # WRAP_GGO(clitkExtractSlice_GGO_C clitkExtractSlice.ggo)
144 # ADD_EXECUTABLE(clitkExtractSlice clitkExtractSlice.cxx clitkExtractSliceGenericFilter.cxx ${clitkExtractSlice_GGO_C})
145 # TARGET_LINK_LIBRARIES(clitkExtractSlice clitkCommon ITKIO)
146
147     WRAP_GGO(clitkFlipImage_GGO_C clitkFlipImage.ggo)
148     ADD_EXECUTABLE(clitkFlipImage clitkFlipImage.cxx clitkFlipImageGenericFilter.cxx ${clitkFlipImage_GGO_C})
149     TARGET_LINK_LIBRARIES(clitkFlipImage clitkCommon ITKIO)
150
151     WRAP_GGO(clitkMirrorPadImage_GGO_C clitkMirrorPadImage.ggo)
152     ADD_EXECUTABLE(clitkMirrorPadImage clitkMirrorPadImage.cxx clitkMirrorPadImageGenericFilter.cxx ${clitkMirrorPadImage_GGO_C})
153     TARGET_LINK_LIBRARIES(clitkMirrorPadImage clitkCommon ITKIO)
154
155     WRAP_GGO(clitkImageMoment_GGO_C clitkImageMoment.ggo)
156     ADD_EXECUTABLE(clitkImageMoment clitkImageMoment.cxx clitkImageMomentGenericFilter.cxx ${clitkImageMoment_GGO_C})
157     TARGET_LINK_LIBRARIES(clitkImageMoment clitkCommon ITKIO)
158
159     WRAP_GGO(clitkImageStatistics_GGO_C clitkImageStatistics.ggo)
160     ADD_EXECUTABLE(clitkImageStatistics clitkImageStatistics.cxx clitkImageStatisticsGenericFilter.cxx ${clitkImageStatistics_GGO_C})
161     TARGET_LINK_LIBRARIES(clitkImageStatistics clitkCommon ITKIO ITKStatistics)
162
163     WRAP_GGO(clitkSetOrigin_GGO_C clitkSetOrigin.ggo)
164     ADD_EXECUTABLE(clitkSetOrigin clitkSetOrigin.cxx clitkSetOriginGenericFilter.cxx ${clitkSetOrigin_GGO_C})
165     TARGET_LINK_LIBRARIES(clitkSetOrigin clitkCommon ITKIO )
166      
167     WRAP_GGO(clitkGetOrigin_GGO_C clitkGetOrigin.ggo)
168     ADD_EXECUTABLE(clitkGetOrigin clitkGetOrigin.cxx clitkGetOriginGenericFilter.cxx ${clitkGetOrigin_GGO_C})
169     TARGET_LINK_LIBRARIES(clitkGetOrigin clitkCommon ITKIO )
170
171     WRAP_GGO(clitkGetDirection_GGO_C clitkGetDirection.ggo)
172     ADD_EXECUTABLE(clitkGetDirection clitkGetDirection.cxx clitkGetDirectionGenericFilter.cxx ${clitkGetDirection_GGO_C})
173     TARGET_LINK_LIBRARIES(clitkGetDirection clitkCommon ITKIO)
174
175     WRAP_GGO(clitkSetDirection_GGO_C clitkSetDirection.ggo)
176     ADD_EXECUTABLE(clitkSetDirection clitkSetDirection.cxx clitkSetDirectionGenericFilter.cxx ${clitkSetDirection_GGO_C})
177     TARGET_LINK_LIBRARIES(clitkSetDirection clitkCommon ITKIO)
178
179     WRAP_GGO(clitkGetSize_GGO_C clitkGetSize.ggo)
180     ADD_EXECUTABLE(clitkGetSize  clitkGetSize.cxx clitkGetSizeGenericFilter.cxx ${clitkGetSize_GGO_C})
181     TARGET_LINK_LIBRARIES(clitkGetSize  clitkCommon   ITKIO)
182
183     WRAP_GGO(clitkGetSpacing_GGO_C clitkGetSpacing.ggo)
184     ADD_EXECUTABLE(clitkGetSpacing  clitkGetSpacing.cxx clitkGetSpacingGenericFilter.cxx ${clitkGetSpacing_GGO_C})
185     TARGET_LINK_LIBRARIES(clitkGetSpacing  clitkCommon   ITKIO)
186
187     WRAP_GGO(clitkSetSpacing_GGO_C clitkSetSpacing.ggo)
188     ADD_EXECUTABLE(clitkSetSpacing  clitkSetSpacing.cxx clitkSetSpacingGenericFilter.cxx ${clitkSetSpacing_GGO_C})
189     TARGET_LINK_LIBRARIES(clitkSetSpacing  clitkCommon   ITKIO)
190
191     WRAP_GGO(clitkCombineImage_GGO_C clitkCombineImage.ggo)
192     ADD_EXECUTABLE(clitkCombineImage clitkCombineImage.cxx clitkCombineImageGenericFilter.cxx ${clitkCombineImage_GGO_C})
193     TARGET_LINK_LIBRARIES(clitkCombineImage clitkCommon ITKIO)
194
195     WRAP_GGO(clitkPermuteAxes_GGO_C clitkPermuteAxes.ggo)
196     ADD_EXECUTABLE(clitkPermuteAxes clitkPermuteAxes.cxx clitkPermuteAxesGenericFilter.cxx ${clitkPermuteAxes_GGO_C})
197     TARGET_LINK_LIBRARIES(clitkPermuteAxes clitkCommon ITKIO)
198
199     WRAP_GGO(clitkChangeImageOrientation_GGO_C clitkChangeImageOrientation.ggo)
200     ADD_EXECUTABLE(clitkChangeImageOrientation clitkChangeImageOrientation.cxx clitkChangeImageOrientationGenericFilter.cxx ${clitkChangeImageOrientation_GGO_C})
201     TARGET_LINK_LIBRARIES(clitkChangeImageOrientation clitkCommon ITKIO)
202
203     WRAP_GGO(clitkVFConvert_GGO_C clitkVFConvert.ggo)
204     ADD_EXECUTABLE(clitkVFConvert clitkVFConvert.cxx clitkVFConvertGenericFilter.cxx ${clitkVFConvert_GGO_C})
205     TARGET_LINK_LIBRARIES(clitkVFConvert ITKBasicFilters ITKIO clitkCommon )
206
207     WRAP_GGO(clitkImageToVectorImage_GGO_C clitkImageToVectorImage.ggo)
208     ADD_EXECUTABLE(clitkImageToVectorImage  clitkImageToVectorImage.cxx clitkImageToVectorImageGenericFilter.cxx ${clitkImageToVectorImage_GGO_C})
209     TARGET_LINK_LIBRARIES(clitkImageToVectorImage  clitkCommon   ITKIO)
210
211     WRAP_GGO(clitkVectorImageToImage_GGO_C clitkVectorImageToImage.ggo)
212     ADD_EXECUTABLE(clitkVectorImageToImage  clitkVectorImageToImage.cxx clitkVectorImageToImageGenericFilter.cxx ${clitkVectorImageToImage_GGO_C})
213     TARGET_LINK_LIBRARIES(clitkVectorImageToImage  clitkCommon   ITKIO)
214
215     WRAP_GGO(clitkBSplineCoefficientsToValues_GGO_C clitkBSplineCoefficientsToValues.ggo)
216     ADD_EXECUTABLE(clitkBSplineCoefficientsToValues  clitkBSplineCoefficientsToValues.cxx clitkBSplineCoefficientsToValuesGenericFilter.cxx ${clitkBSplineCoefficientsToValues_GGO_C})
217     TARGET_LINK_LIBRARIES(clitkBSplineCoefficientsToValues  clitkCommon   ITKIO)
218
219     WRAP_GGO(clitkValuesToBSplineCoefficients_GGO_C clitkValuesToBSplineCoefficients.ggo)
220     ADD_EXECUTABLE(clitkValuesToBSplineCoefficients  clitkValuesToBSplineCoefficients.cxx clitkValuesToBSplineCoefficientsGenericFilter.cxx ${clitkValuesToBSplineCoefficients_GGO_C})
221     TARGET_LINK_LIBRARIES(clitkValuesToBSplineCoefficients clitkCommon ITKIO)
222 ENDIF(CLITK_BUILD_TOOLS)