-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFindVVTK6.cmake
362 lines (348 loc) · 11 KB
/
FindVVTK6.cmake
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
# $Id: FindVVTK.cmake 37930 2013-09-13 08:09:16Z dr165799 $
include( FindPackageHandleStandardArgs )
include( VistaFindUtils )
if( NOT VVTK6_FOUND )
# VTK hides it config file quite well, so we have to search it explicitely
set( _SEARCH_PREFIXES )
if( EXISTS "$ENV{${_PACKAGE_NAME_UPPER}_ROOT}" )
list( APPEND _SEARCH_PREFIXES
"$ENV{${_PACKAGE_NAME_UPPER}_ROOT}/${VISTA_HWARCH}/lib/cmake/*"
"$ENV{${_PACKAGE_NAME_UPPER}_ROOT}/lib/cmake/*"
)
endif( EXISTS "$ENV{${_PACKAGE_NAME_UPPER}_ROOT}" )
foreach( _PATH ${VISTA_PACKAGE_SEARCH_PATHS} )
file( TO_CMAKE_PATH ${_PATH} _PATH )
list( APPEND _SEARCH_PREFIXES
"${_PATH}/VTK*/${VISTA_HWARCH}/lib/*"
"${_PATH}/VTK*/lib/*"
"${_PATH}/VTK*/${VISTA_HWARCH}/lib/cmake/*"
"${_PATH}/VTK*/lib/cmake/*"
"${_PATH}/VTK/*/${VISTA_HWARCH}/lib/*"
"${_PATH}/VTK/*/lib/*"
"${_PATH}/vtk*/${VISTA_HWARCH}/lib/*"
"${_PATH}/vtk*/lib/*"
"${_PATH}/vtk/*/${VISTA_HWARCH}/lib/*"
"${_PATH}/vtk/*/lib/*"
"${_PATH}/vtk/*/${VISTA_HWARCH}/lib/cmake/*"
"${_PATH}/vtk/*/lib/cmake/*"
)
endforeach( _PATH ${VISTA_PACKAGE_SEARCH_PATHS} )
foreach( _PATH ${_SEARCH_PREFIXES} )
file( GLOB _TMP_FILES "${_PATH}/VTKConfig.cmake" )
foreach( _FILE ${_TMP_FILES} )
file( TO_CMAKE_PATH ${_FILE} _FOUND_FILE )
string( REPLACE "/VTKConfig.cmake" "" _FOUND_PATH ${_FOUND_FILE} )
file( TO_CMAKE_PATH ${_FOUND_PATH} _FOUND_PATH )
list( APPEND VTK_CONFIG_DIRS ${_FOUND_PATH} )
endforeach( _FILE ${_TMP_FILES} )
endforeach( _PATH ${_PREFIX_PATHES} )
if( VTK_CONFIG_DIRS )
list( REMOVE_DUPLICATES VTK_CONFIG_DIRS )
endif( VTK_CONFIG_DIRS )
find_package( VTK ${VVTK_FIND_VERSION} PATHS ${VTK_DIR} ${VTK_CONFIG_DIRS} )
if( VTK_FOUND )
# a VTKConfig.cmake has been found and loaded
# check if debug libraries are available
set( _TMP_VTK_DEBUG_LIB "_TMP_VTK_DEBUG_LIB-NOTFOUND" CACHE INTERNAL "" FORCE )
find_library( _TMP_VTK_DEBUG_LIB "vtkCommonCoreD" PATH ${VTK_LIBRARY_DIRS} NO_DEFAULT_PATH )
if( _TMP_VTK_DEBUG_LIB )
set( _DEBUG_AVAILABLE TRUE )
else( _TMP_VTK_DEBUG_LIB )
set( _DEBUG_AVAILABLE FALSE )
endif( _TMP_VTK_DEBUG_LIB )
set( _TMP_VTK_DEBUG_LIB "_TMP_VTK_DEBUG_LIB-NOTFOUND" CACHE INTERNAL "" FORCE )
if( _DEBUG_AVAILABLE )
set( VTK6_LIBRARIES optimized vtkalglib
optimized vtkChartsCore
optimized vtkCommonColor
optimized vtkCommonComputationalGeometry
optimized vtkCommonCore
optimized vtkCommonDataModel
optimized vtkCommonExecutionModel
optimized vtkCommonMath
optimized vtkCommonMisc
optimized vtkCommonSystem
optimized vtkCommonTransforms
optimized vtkDICOMParser
optimized vtkDomainsChemistry
optimized vtkexoIIc
optimized vtkexpat
optimized vtkFiltersAMR
optimized vtkFiltersCore
optimized vtkFiltersExtraction
optimized vtkFiltersFlowPaths
optimized vtkFiltersGeneral
optimized vtkFiltersGeneric
optimized vtkFiltersGeometry
optimized vtkFiltersHybrid
optimized vtkFiltersHyperTree
optimized vtkFiltersImaging
optimized vtkFiltersModeling
optimized vtkFiltersParallel
optimized vtkFiltersParallelImaging
optimized vtkFiltersProgrammable
optimized vtkFiltersSelection
optimized vtkFiltersSMP
optimized vtkFiltersSources
optimized vtkFiltersStatistics
optimized vtkFiltersTexture
optimized vtkFiltersVerdict
optimized vtkfreetype
optimized vtkftgl
optimized vtkgl2ps
optimized vtkhdf5
optimized vtkhdf5_hl
optimized vtkImagingColor
optimized vtkImagingCore
optimized vtkImagingFourier
optimized vtkImagingGeneral
optimized vtkImagingHybrid
optimized vtkImagingMath
optimized vtkImagingMorphological
optimized vtkImagingSources
optimized vtkImagingStatistics
optimized vtkImagingStencil
optimized vtkInfovisCore
optimized vtkInfovisLayout
optimized vtkIOAMR
optimized vtkIOCore
optimized vtkIOEnSight
optimized vtkIOExodus
optimized vtkIOExport
optimized vtkIOGeometry
optimized vtkIOImage
optimized vtkIOImport
optimized vtkIOInfovis
optimized vtkIOLegacy
optimized vtkIOLSDyna
optimized vtkIOMINC
optimized vtkIOMovie
optimized vtkIONetCDF
optimized vtkIOParallel
optimized vtkIOPLY
optimized vtkIOSQL
optimized vtkIOVideo
optimized vtkIOXML
optimized vtkIOXMLParser
optimized vtkjpeg
optimized vtkjsoncpp
optimized vtklibxml2
optimized vtkmetaio
optimized vtkNetCDF
optimized vtkNetCDF_cxx
optimized vtkoggtheora
optimized vtkParallelCore
optimized vtkpng
optimized vtkRenderingAnnotation
optimized vtkRenderingContext2D
optimized vtkRenderingCore
optimized vtkRenderingFreeType
optimized vtkRenderingGL2PS
optimized vtkRenderingLabel
optimized vtkRenderingOpenGL
optimized vtksqlite
optimized vtksys
optimized vtktiff
#optimized vtkverdict
optimized vtkzlib
debug vtkalglibD
debug vtkChartsCoreD
debug vtkCommonColorD
debug vtkCommonComputationalGeometryD
debug vtkCommonCoreD
debug vtkCommonDataModelD
debug vtkCommonExecutionModelD
debug vtkCommonMathD
debug vtkCommonMiscD
debug vtkCommonSystemD
debug vtkCommonTransformsD
debug vtkDICOMParserD
debug vtkDomainsChemistryD
debug vtkexoIIcD
debug vtkexpatD
debug vtkFiltersAMRD
debug vtkFiltersCoreD
debug vtkFiltersExtractionD
debug vtkFiltersFlowPathsD
debug vtkFiltersGeneralD
debug vtkFiltersGenericD
debug vtkFiltersGeometryD
debug vtkFiltersHybridD
debug vtkFiltersHyperTreeD
debug vtkFiltersImagingD
debug vtkFiltersModelingD
debug vtkFiltersParallelD
debug vtkFiltersParallelImagingD
debug vtkFiltersProgrammableD
debug vtkFiltersSelectionD
debug vtkFiltersSMPD
debug vtkFiltersSourcesD
debug vtkFiltersStatisticsD
debug vtkFiltersTextureD
debug vtkFiltersVerdictD
debug vtkfreetypeD
debug vtkftglD
debug vtkgl2psD
debug vtkhdf5D
debug vtkhdf5_hlD
debug vtkImagingColorD
debug vtkImagingCoreD
debug vtkImagingFourierD
debug vtkImagingGeneralD
debug vtkImagingHybridD
debug vtkImagingMathD
debug vtkImagingMorphologicalD
debug vtkImagingSourcesD
debug vtkImagingStatisticsD
debug vtkImagingStencilD
debug vtkInfovisCoreD
debug vtkInfovisLayoutD
debug vtkIOAMRD
debug vtkIOCoreD
debug vtkIOEnSightD
debug vtkIOExodusD
debug vtkIOExportD
debug vtkIOGeometryD
debug vtkIOImageD
debug vtkIOImportD
debug vtkIOInfovisD
debug vtkIOLegacyD
debug vtkIOLSDynaD
debug vtkIOMINCD
debug vtkIOMovieD
debug vtkIONetCDFD
debug vtkIOParallelD
debug vtkIOPLYD
debug vtkIOSQLD
debug vtkIOVideoD
debug vtkIOXMLD
debug vtkIOXMLParserD
debug vtkjpegD
debug vtkjsoncppD
debug vtklibxml2D
debug vtkmetaioD
debug vtkNetCDFD
debug vtkNetCDF_cxxD
debug vtkoggtheoraD
debug vtkParallelCoreD
debug vtkpngD
debug vtkRenderingAnnotationD
debug vtkRenderingContext2DD
debug vtkRenderingCoreD
debug vtkRenderingFreeTypeD
debug vtkRenderingGL2PSD
debug vtkRenderingLabelD
debug vtkRenderingOpenGLD
debug vtksqliteD
debug vtksysD
debug vtktiffD
#debug vtkverdictD
debug vtkzlibD
)
else( _DEBUG_AVAILABLE ) # no debug libraries available
set( VTK6_LIBRARIES vtkalglib
vtkChartsCore
vtkCommonColor
vtkCommonComputationalGeometry
vtkCommonCore
vtkCommonDataModel
vtkCommonExecutionModel
vtkCommonMath
vtkCommonMisc
vtkCommonSystem
vtkCommonTransforms
vtkDICOMParser
vtkDomainsChemistry
vtkexoIIc
vtkexpat
vtkFiltersAMR
vtkFiltersCore
vtkFiltersExtraction
vtkFiltersFlowPaths
vtkFiltersGeneral
vtkFiltersGeneric
vtkFiltersGeometry
vtkFiltersHybrid
vtkFiltersHyperTree
vtkFiltersImaging
vtkFiltersModeling
vtkFiltersParallel
vtkFiltersParallelImaging
vtkFiltersProgrammable
vtkFiltersSelection
vtkFiltersSMP
vtkFiltersSources
vtkFiltersStatistics
vtkFiltersTexture
vtkFiltersVerdict
vtkfreetype
vtkftgl
vtkgl2ps
vtkhdf5
vtkhdf5_hl
vtkImagingColor
vtkImagingCore
vtkImagingFourier
vtkImagingGeneral
vtkImagingHybrid
vtkImagingMath
vtkImagingMorphological
vtkImagingSources
vtkImagingStatistics
vtkImagingStencil
vtkInfovisCore
vtkInfovisLayout
vtkIOAMR
vtkIOCore
vtkIOEnSight
vtkIOExodus
vtkIOExport
vtkIOGeometry
vtkIOImage
vtkIOImport
vtkIOInfovis
vtkIOLegacy
vtkIOLSDyna
vtkIOMINC
vtkIOMovie
vtkIONetCDF
vtkIOParallel
vtkIOPLY
vtkIOSQL
vtkIOVideo
vtkIOXML
vtkIOXMLParser
vtkjpeg
vtkjsoncpp
vtklibxml2
vtkmetaio
vtkNetCDF
vtkNetCDF_cxx
vtkoggtheora
vtkParallelCore
vtkpng
vtkRenderingAnnotation
vtkRenderingContext2D
vtkRenderingCore
vtkRenderingFreeType
vtkRenderingGL2PS
vtkRenderingLabel
vtkRenderingOpenGL
vtksqlite
vtksys
vtktiff
#vtkverdict
vtkzlib
)
endif( _DEBUG_AVAILABLE )
# VTK's dlls are in the VTK_RUNTIME_LIBRARY_DIRS, so we have to add this to the library dirs
# to find them
set( VTK6_INCLUDE_DIRS ${VTK_INCLUDE_DIRS} )
set( VTK6_LIBRARY_DIRS ${VTK_LIBRARY_DIRS} ${VTK_RUNTIME_LIBRARY_DIRS} )
set( VTK6_ROOT_DIR ${VTK_INSTALL_PREFIX} )
# note that there is also a VTK_USE_FILE, which will automatically be called
# by vista_use_package
endif( VTK_FOUND )
endif( NOT VVTK6_FOUND )
find_package_handle_standard_args( VVTK6 "VTK could not be found" VTK6_ROOT_DIR )
set( VTK_FOUND ${VVTK6_FOUND} )