vtk-config.cmake
Go to the documentation of this file.
1 #[==[.md
2 # vtk-config.cmake
3 
4 This file is used by CMake when finding VTK. It provides the [VTK module
5 API][] as well as some VTK-specific APIs.
6 
7 The following variables are provided by this module:
8 
9  * `VTK_VERSION`: The version of VTK found.
10  * `VTK_MAJOR_VERSION`: The major version of VTK found.
11  * `VTK_MINOR_VERSION`: The minor version of VTK found.
12  * `VTK_BUILD_VERSION`: The build version of VTK found.
13  * `VTK_AVAILABLE_COMPONENTS`: Components available with VTK.
14  * `VTK_PREFIX_PATH`: Install prefix for VTK.
15  * `VTK_LEGACY_REMOVE`: Whether VTK's deprecated APIs are
16  compiled out or not.
17  * `VTK_HAS_VTKm: [Deprecated, use VTK_HAS_VISKORES] If VTK provides VTK-m.
18  * `VTK_HAS_VISKORES`: If VTK provides Viskores.
19  * `VTK_OPENGL_HAS_EGL`: If VTK can use EGL for OpenGL context.
20  * `VTK_USE_X`: If VTK uses X windows.
21  * `VTK_USE_COCOA`: If VTK uses Cocoa (only present on APPLE systems).
22  * `VTK_PYTHON_VERSION`: The major version of Python used by VTK. Empty if
23  Python support is not available.
24  * `VTK_WRAP_PYTHON`: If VTK itself provides Python wrapping. If so, the
25  Python parts of the module API are available.
26  * `VTK_WRAP_JAVA`: If VTK itself provides Java wrapping. If so, the
27  Java parts of the module API are available.
28  * `VTK_WRAP_SERIALIZATION`: If VTK itself provides serialization wrappings
29  for marshallable classes in modules with `INCLUDE_MARSHAL`.
30  * `VTK_PYTHONPATH`: Where VTK's Python modules live inside the install
31  prefix. Unset if Python is not available.
32  * `VTK_LIBRARIES`: The list of modules specified by `COMPONENTS` and
33  `OPTIONAL_COMPONENTS`. However, if no components are specified, all
34  available components are added to this variable. This may be used in
35  `MODULES` arguments in the API (e.g., `vtk_module_autoinit`). All modules
36  are also targets and may be linked to using `target_link_libraries`.
37  * `VTK_AUTOINIT_INCLUDE`: The header to include for access to VTK's autoinit
38  support.
39  * `VTK_QT_VERSION`: The major version of Qt used by VTK if Qt support enabled.
40  * `VTK_QML_DIR`: Where VTK's QML plugins live if QML support is enabled.
41  * `VTK_ENABLE_VR_COLLABORATION`: Is VR collaboration enabled when VR is enabled.
42  * `VTK_SMP_BACKENDS`: The list of available SMP backends.
43 
44 For more information about the Python in use by VTK, (note that the `Python`
45 component must be found to guarantee that this happens), see the
46 [FindPython3][] documentation for what is available. Of particular use are
47 likely to be:
48 
49  - the `Python3_VERSION` variable; and
50  - the `Python3::Python` target.
51 
52 [FindPython3]: https://cmake.org/cmake/help/v3.13/module/FindPython3.html
53 [VTK module API]: TODO: Link to hosted documentation.
54 #]==]
55 
56 if (CMAKE_VERSION VERSION_LESS "3.12")
57  set("${CMAKE_FIND_PACKAGE_NAME}_FOUND" 0)
58  set("${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE"
59  "VTK requires CMake 3.12 in order to reliably be used.")
60  return ()
61 endif ()
62 
63 cmake_policy(PUSH)
64 cmake_policy(VERSION 3.12)
65 
66 set("${CMAKE_FIND_PACKAGE_NAME}_AVAILABLE_COMPONENTS" "WrappingTools;WebPython;WebCore;WebGLExporter;PythonInterpreter;ViewsContext2D;ViewsCore;RenderingUI;loguru;cli11;TestingRendering;ImagingColor;TestingDataModel;TestingCore;SerializationManager;RenderingVolumeAMR;RenderingVolumeOpenGL2;RenderingParallelLIC;RenderingParallel;RenderingVRModels;RenderingMatplotlib;RenderingLabel;octree;RenderingLICOpenGL2;RenderingGridAxes;RenderingContextOpenGL2;RenderingCellGrid;ImagingMath;ParallelMPI4Py;mpi4py;ImagingFourier;IOXdmf2;IOXMLParser;libxml2;xdmf2;IOVeraOut;IOVPIC;vpic;IOTecplotTable;utf8;IOTRUCHAS;IOSegY;IOParallelXML;IOParallelNetCDF;IOParallelLSDyna;IOLSDyna;IOParallelExodus;IOExodus;exodusII;IOPLY;IOPIO;IOOggTheora;theora;ogg;IOOMF;IONetCDF;IOParallel;IOMPIImage;IOLANLX3D;IOImport;IOIOSS;ioss;IOHDF;IOHDFTools;IOH5part;h5part;IOH5Rage;IOFLUENTCFF;IOMovie;IOFDS;IOInfovis;InfovisCore;IOExportGL2PS;RenderingGL2PSOpenGL2;gl2ps;png;netcdf;IOEnSight;IOERF;IOCityGML;IOChemistry;IOCatalystConduit;catalyst;IOCONVERGECFD;IOCGNSReader;cgns;IOAvmesh;IOAsynchronous;IOExport;RenderingVtkJS;IOGeometry;RenderingSceneGraph;jsoncpp;IOAMR;hdf5;GeovisCore;libproj;sqlite;InteractionWidgets;RenderingVolume;RenderingAnnotation;InteractionStyle;ImagingHybrid;FiltersTensor;FiltersPython;FiltersProgrammable;FiltersPoints;FiltersParallelVerdict;FiltersParallelStatistics;FiltersParallelGeometry;FiltersParallelFlowPaths;FiltersParallelDIY2;ParallelDIY;FiltersTemporal;FiltersImaging;ImagingGeneral;FiltersGeometryPreview;FiltersGeneric;FiltersFlowPaths;eigen;FiltersAMR;FiltersParallelMPI;FiltersParallel;FiltersTexture;FiltersModeling;ParallelMPI;mpi;DomainsChemistryOpenGL2;RenderingOpenGL2;RenderingHyperTreeGrid;x11;glad;FiltersHybrid;DomainsChemistry;WrappingPythonCore;Python;ChartsCore;FiltersExtraction;diy2;IOXML;expat;ParallelCore;IOLegacy;IOCellGrid;FiltersCellGrid;token;FiltersStatistics;FiltersHyperTree;ImagingSources;IOImage;DICOMParser;jpeg;metaio;tiff;IOCore;lzma;fast_float;lz4;RenderingContext2D;RenderingFreeType;freetype;kwiml;zlib;RenderingCore;FiltersSources;CommonColor;AcceleratorsVTKmFilters;AcceleratorsVTKmCore;AcceleratorsVTKmDataModel;ImagingCore;FiltersGeneral;FiltersVerdict;verdict;FiltersGeometry;CommonComputationalGeometry;FiltersCore;FiltersReduction;CommonExecutionModel;vtkviskores;CommonDataModel;pegtl;pugixml;CommonSystem;CommonMisc;exprtk;CommonTransforms;CommonMath;kissfft;CommonCore;scn;vtksys;nlohmannjson;fmt;WrapHierarchy;WrapPython;WrapPythonInit;ParseJava;WrapJava")
67 
68 set(_vtk_temp_variables)
69 set(_vtk_real_components)
70 foreach (_vtk_component IN LISTS "${CMAKE_FIND_PACKAGE_NAME}_FIND_COMPONENTS")
71  # Handle component requests that are not VTK.
72  if (NOT _vtk_component IN_LIST "${CMAKE_FIND_PACKAGE_NAME}_AVAILABLE_COMPONENTS")
73  set("${CMAKE_FIND_PACKAGE_NAME}_${_vtk_component}_FOUND" 0)
74  list(APPEND "${CMAKE_FIND_PACKAGE_NAME}_${_vtk_component}_NOT_FOUND_MESSAGE"
75  "The ${_vtk_component} component is not recognized.")
76  endif ()
77  if (_vtk_component MATCHES "^vtk" AND
78  NOT _vtk_component STREQUAL "vtksys" AND
79  NOT _vtk_component STREQUAL "vtkjava")
80  string(SUBSTRING "${_vtk_component}" 3 -1 _vtk_actual_component)
81  if (NOT ${CMAKE_FIND_PACKAGE_NAME}_FIND_VERSION)
82  if (NOT ${CMAKE_FIND_PACKAGE_NAME}_FIND_QUIETLY)
83  message(DEPRECATION
84  "The new name for the '${_vtk_component}' component is "
85  "'${_vtk_actual_component}'")
86  endif ()
87  elseif (${CMAKE_FIND_PACKAGE_NAME}_FIND_VERSION VERSION_LESS "8.90")
88  # Ignore for compatibility.
89  else ()
90  message(FATAL_ERROR
91  "The new name for the '${_vtk_component}' component is "
92  "'${_vtk_actual_component}'. By requesting at least version 8.90, the "
93  "new component names are now required.")
94  endif ()
95  list(APPEND _vtk_real_components
96  "${_vtk_actual_component}")
97  list(APPEND _vtk_temp_variables
98  "${CMAKE_FIND_PACKAGE_NAME}_FIND_REQUIRED_${_vtk_actual_component}")
99  set("${CMAKE_FIND_PACKAGE_NAME}_FIND_REQUIRED_${_vtk_actual_component}"
100  "${${CMAKE_FIND_PACKAGE_NAME}_FIND_REQUIRED_${_vtk_component}}")
101  unset(_vtk_actual_component)
102  else ()
103  list(APPEND _vtk_real_components
104  "${_vtk_component}")
105  endif ()
106 endforeach ()
107 unset(_vtk_component)
108 set("${CMAKE_FIND_PACKAGE_NAME}_FIND_COMPONENTS"
109  ${_vtk_real_components})
110 unset(_vtk_real_components)
111 
112 set("${CMAKE_FIND_PACKAGE_NAME}_CMAKE_MODULE_PATH_save" "${CMAKE_MODULE_PATH}")
113 list(INSERT CMAKE_MODULE_PATH 0
114  "${CMAKE_CURRENT_LIST_DIR}")
115 
116 set("${CMAKE_FIND_PACKAGE_NAME}_CMAKE_PREFIX_PATH_save" "${CMAKE_PREFIX_PATH}")
117 include("${CMAKE_CURRENT_LIST_DIR}/vtk-prefix.cmake")
118 set("${CMAKE_FIND_PACKAGE_NAME}_PREFIX_PATH"
119  "${_vtk_module_import_prefix}")
120 unset(_vtk_module_import_prefix)
121 list(INSERT CMAKE_PREFIX_PATH 0
122  "${${CMAKE_FIND_PACKAGE_NAME}_PREFIX_PATH}")
123 
124 set("${CMAKE_FIND_PACKAGE_NAME}_VERSION" "9.5.20251209")
125 set("${CMAKE_FIND_PACKAGE_NAME}_MAJOR_VERSION" "9")
126 set("${CMAKE_FIND_PACKAGE_NAME}_MINOR_VERSION" "5")
127 set("${CMAKE_FIND_PACKAGE_NAME}_BUILD_VERSION" "20251209")
128 set("${CMAKE_FIND_PACKAGE_NAME}_LEGACY_REMOVE" "ON")
129 set("${CMAKE_FIND_PACKAGE_NAME}_AUTOINIT_INCLUDE" "\"vtkAutoInit.h\"")
130 set("${CMAKE_FIND_PACKAGE_NAME}_SMP_BACKENDS" "STDThread;Sequential")
131 
132 unset("${CMAKE_FIND_PACKAGE_NAME}_FOUND")
133 set("${CMAKE_FIND_PACKAGE_NAME}_HAS_VISKORES" "ON")
134 set("${CMAKE_FIND_PACKAGE_NAME}_HAS_VTKm" "ON")
135 if (${CMAKE_FIND_PACKAGE_NAME}_HAS_VISKORES)
136  if (NOT "OFF") # VTK_MODULE_USE_EXTERNAL_VTK_vtkviskores
137  find_package(Viskores
138  PATHS "${CMAKE_CURRENT_LIST_DIR}/viskores"
139  NO_DEFAULT_PATH)
140  if (NOT Viskores_FOUND)
141  set("${CMAKE_FIND_PACKAGE_NAME}_FOUND" 0)
142  set("${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE" "VTK internal enabled Viskores cannot be founded")
143  endif ()
144  endif ()
145 endif ()
146 
147 include("${CMAKE_CURRENT_LIST_DIR}/vtkCMakeBackports.cmake")
148 include("${CMAKE_CURRENT_LIST_DIR}/${CMAKE_FIND_PACKAGE_NAME}-targets.cmake")
149 include("${CMAKE_CURRENT_LIST_DIR}/${CMAKE_FIND_PACKAGE_NAME}-vtk-module-properties.cmake")
150 
151 include("${CMAKE_CURRENT_LIST_DIR}/vtk-find-package-helpers.cmake" OPTIONAL)
152 
153 # Ensure that the right OpenGL preference is in place when finding the OpenGL
154 # libraries.
155 if (0) # vtk_opengl_preference_set
156  if (DEFINED OpenGL_GL_PREFERENCE)
157  set("${CMAKE_FIND_PACKAGE_NAME}_OpenGL_GL_PREFERENCE_save" "${OpenGL_GL_PREFERENCE}")
158  endif ()
159  set(OpenGL_GL_PREFERENCE "")
160 endif ()
161 
162 # Ensure that python is found based on location, not on version
163 # See https://cmake.org/cmake/help/latest/module/FindPython.html
164 if (DEFINED Python3_FIND_STRATEGY)
165  set("${CMAKE_FIND_PACKAGE_NAME}_Python3_FIND_STRATEGY_save" "${Python3_FIND_STRATEGY}")
166 endif ()
167 set(Python3_FIND_STRATEGY LOCATION)
168 
169 # Ensures that the OpenGL::GLES3 is found.
170 include("${CMAKE_CURRENT_LIST_DIR}/vtkMobileDevices.cmake")
171 include("${CMAKE_CURRENT_LIST_DIR}/${CMAKE_FIND_PACKAGE_NAME}-vtk-module-find-packages.cmake")
172 
173 if (0) # vtk_opengl_preference_set
174  if (DEFINED "${CMAKE_FIND_PACKAGE_NAME}_OpenGL_GL_PREFERENCE_save")
175  set(OpenGL_GL_PREFERENCE "${${CMAKE_FIND_PACKAGE_NAME}_OpenGL_GL_PREFERENCE_save}")
176  unset("${CMAKE_FIND_PACKAGE_NAME}_OpenGL_GL_PREFERENCE_save")
177  else ()
178  unset(OpenGL_GL_PREFERENCE)
179  endif ()
180 endif ()
181 
182 if (DEFINED "${CMAKE_FIND_PACKAGE_NAME}_Python3_FIND_STRATEGY_save")
183  set(Python3_FIND_STRATEGY "${${CMAKE_FIND_PACKAGE_NAME}_Python3_FIND_STRATEGY_save}")
184  unset("${CMAKE_FIND_PACKAGE_NAME}_Python3_FIND_STRATEGY_save")
185 else ()
186  unset(Python3_FIND_STRATEGY)
187 endif ()
188 
189 set(VTK_OPENGL_HAS_EGL "ON")
190 set(VTK_USE_X "ON")
191 if (APPLE AND NOT APPLE_IOS)
192  set(VTK_USE_COCOA "OFF")
193 endif ()
194 
195 if (TARGET VTK::RenderingVR)
196  set("${CMAKE_FIND_PACKAGE_NAME}_ENABLE_VR_COLLABORATION" "")
197 endif ()
198 
199 if () # VTK_QT_VERSION
200  set("${CMAKE_FIND_PACKAGE_NAME}_QT_VERSION" "")
201 endif ()
202 
203 if (0) # vtk_has_qml
204  set("${CMAKE_FIND_PACKAGE_NAME}_QML_DIR" "${${CMAKE_FIND_PACKAGE_NAME}_PREFIX_PATH}/")
205 endif ()
206 
207 include("${CMAKE_CURRENT_LIST_DIR}/vtkModule.cmake")
208 include("${CMAKE_CURRENT_LIST_DIR}/vtkEncodeString.cmake")
209 include("${CMAKE_CURRENT_LIST_DIR}/vtkHashSource.cmake")
210 include("${CMAKE_CURRENT_LIST_DIR}/vtkObjectFactory.cmake")
211 
212 include("${CMAKE_CURRENT_LIST_DIR}/vtkModuleJson.cmake")
213 
214 set("${CMAKE_FIND_PACKAGE_NAME}_PYTHON_VERSION" "3")
215 set("${CMAKE_FIND_PACKAGE_NAME}_WRAP_PYTHON" "ON")
216 if (${CMAKE_FIND_PACKAGE_NAME}_WRAP_PYTHON)
217  include("${CMAKE_CURRENT_LIST_DIR}/VTKPython-targets.cmake")
218  include("${CMAKE_CURRENT_LIST_DIR}/vtkmodules-vtk-python-module-properties.cmake")
219  include("${CMAKE_CURRENT_LIST_DIR}/vtkModuleWrapPython.cmake")
220  set("${CMAKE_FIND_PACKAGE_NAME}_PYTHONPATH" "lib64/python3.13/site-packages")
221 endif ()
222 
223 set("${CMAKE_FIND_PACKAGE_NAME}_WRAP_JAVA" "")
224 if (${CMAKE_FIND_PACKAGE_NAME}_WRAP_JAVA)
225  include("${CMAKE_CURRENT_LIST_DIR}/vtkModuleWrapJava.cmake")
226 
227  if () # VTK_JAVA_JOGL_COMPONENT
228  set(_vtk_find_jogl_args)
229  if (${CMAKE_FIND_PACKAGE_NAME}_FIND_QUIETLY)
230  list(APPEND _vtk_find_jogl_args QUIET)
231  endif ()
232  find_package(JOGL ${_vtk_find_jogl_args})
233  unset(_vtk_find_jogl_args)
234 
235  if (JOGL_FOUND)
236  include("${CMAKE_CURRENT_LIST_DIR}/VTKJava-targets.cmake")
237  set("${CMAKE_FIND_PACKAGE_NAME}_vtkjava_FOUND" 1)
238  else ()
239  set("${CMAKE_FIND_PACKAGE_NAME}_vtkjava_FOUND" 0)
240  set("${CMAKE_FIND_PACKAGE_NAME}_vtkjava_NOT_FOUND_MESSAGE"
241  "JOGL was not found")
242  endif ()
243  endif ()
244 endif ()
245 
246 set("${CMAKE_FIND_PACKAGE_NAME}_WRAP_JAVASCRIPT" "")
247 if (${CMAKE_FIND_PACKAGE_NAME}_WRAP_JAVASCRIPT)
248  include("${CMAKE_CURRENT_LIST_DIR}/VTKJavaScript-targets.cmake")
249  include("${CMAKE_CURRENT_LIST_DIR}/vtkModuleWrapJavaScript.cmake")
250 endif ()
251 
252 set("${CMAKE_FIND_PACKAGE_NAME}_WRAP_SERIALIZATION" "ON")
253 include("${CMAKE_CURRENT_LIST_DIR}/vtkModuleSerialization.cmake")
254 
255 set(_vtk_search_components
256  ${${CMAKE_FIND_PACKAGE_NAME}_FIND_COMPONENTS})
257 if (NOT _vtk_search_components)
258  set(_vtk_search_components
259  ${${CMAKE_FIND_PACKAGE_NAME}_AVAILABLE_COMPONENTS})
260 endif ()
261 list(REMOVE_ITEM _vtk_search_components
262  # These components need to always be requested explicitly since they are
263  # not modules.
264  WrapHierarchy;vtkbuild;vtkplatform;vtkpython;pvtkpython;WrapPython;WrapPythonInit;vtkjava;ParseJava;WrapJava;vtkWebAssemblyTestLinkOptions)
265 set(_vtk_components_to_check)
266 foreach (_vtk_component IN LISTS _vtk_search_components)
267  if (DEFINED "${CMAKE_FIND_PACKAGE_NAME}_${_vtk_component}_FOUND")
268  # It was already not-found (likely due to `find-package` failures).
269  elseif (TARGET "${CMAKE_FIND_PACKAGE_NAME}::${_vtk_component}")
270  list(APPEND _vtk_components_to_check
271  "${_vtk_component}")
272  else ()
273  set("${CMAKE_FIND_PACKAGE_NAME}_${_vtk_component}_FOUND" 0)
274  list(APPEND "${CMAKE_FIND_PACKAGE_NAME}_${_vtk_component}_NOT_FOUND_MESSAGE"
275  "The ${_vtk_component} component is not available.")
276  endif ()
277 endforeach ()
278 unset(_vtk_component)
279 unset(_vtk_search_components)
280 
281 while (_vtk_components_to_check)
282  list(GET _vtk_components_to_check 0 _vtk_component)
283  list(REMOVE_AT _vtk_components_to_check 0)
284  if (DEFINED "${CMAKE_FIND_PACKAGE_NAME}_${_vtk_component}_FOUND")
285  # We've already made a determiniation.
286  continue ()
287  endif ()
288 
289  get_property(_vtk_public_dependencies
290  TARGET "${CMAKE_FIND_PACKAGE_NAME}::${_vtk_component}"
291  PROPERTY "INTERFACE_vtk_module_depends")
292  get_property(_vtk_private_dependencies
293  TARGET "${CMAKE_FIND_PACKAGE_NAME}::${_vtk_component}"
294  PROPERTY "INTERFACE_vtk_module_private_depends")
295  get_property(_vtk_optional_dependencies
296  TARGET "${CMAKE_FIND_PACKAGE_NAME}::${_vtk_component}"
297  PROPERTY "INTERFACE_vtk_module_optional_depends")
298  set(_vtk_dependencies
299  ${_vtk_public_dependencies}
300  ${_vtk_private_dependencies})
301  foreach (_vtk_optional_dependency IN LISTS _vtk_optional_dependencies)
302  if (TARGET "${_vtk_optional_dependency}")
303  list(APPEND _vtk_dependencies
304  "${_vtk_optional_dependency}")
305  endif ()
306  endforeach ()
307  unset(_vtk_public_dependencies)
308  unset(_vtk_private_dependencies)
309  unset(_vtk_optional_dependency)
310  unset(_vtk_optional_dependencies)
311 
312  string(REPLACE "${CMAKE_FIND_PACKAGE_NAME}::" "" _vtk_dependencies "${_vtk_dependencies}")
313  set(_vtk_all_dependencies_checked TRUE)
314  foreach (_vtk_dependency IN LISTS _vtk_dependencies)
315  if (DEFINED "${CMAKE_FIND_PACKAGE_NAME}_${_vtk_dependency}_FOUND")
316  if (NOT ${CMAKE_FIND_PACKAGE_NAME}_${_vtk_dependency}_FOUND)
317  set("${CMAKE_FIND_PACKAGE_NAME}_${_vtk_component}_FOUND" 0)
318  list(APPEND "${CMAKE_FIND_PACKAGE_NAME}_${_vtk_component}_NOT_FOUND_MESSAGE"
319  "Failed to find the ${_vtk_dependency} component.")
320  endif ()
321  else ()
322  # Check its dependencies.
323  list(APPEND _vtk_components_to_check
324  "${_vtk_dependency}")
325  set(_vtk_all_found FALSE)
326  endif ()
327  endforeach ()
328  if (NOT DEFINED "${CMAKE_FIND_PACKAGE_NAME}_${_vtk_component}_FOUND")
329  if (_vtk_all_dependencies_checked)
330  set("${CMAKE_FIND_PACKAGE_NAME}_${_vtk_component}_FOUND" 1)
331  else ()
332  list(APPEND _vtk_components_to_check
333  "${_vtk_component}")
334  endif ()
335  endif ()
336  unset(_vtk_all_dependencies_checked)
337  unset(_vtk_dependency)
338  unset(_vtk_dependencies)
339 endwhile ()
340 unset(_vtk_component)
341 unset(_vtk_components_to_check)
342 
343 set(_vtk_missing_components)
344 foreach (_vtk_component IN LISTS "${CMAKE_FIND_PACKAGE_NAME}_FIND_COMPONENTS")
345  if (NOT ${CMAKE_FIND_PACKAGE_NAME}_${_vtk_component}_FOUND AND ${CMAKE_FIND_PACKAGE_NAME}_FIND_REQUIRED_${_vtk_component})
346  list(APPEND _vtk_missing_components
347  "${_vtk_component}")
348  endif ()
349 endforeach ()
350 
351 if (_vtk_missing_components)
352  list(REMOVE_DUPLICATES _vtk_missing_components)
353  list(SORT _vtk_missing_components)
354  string(REPLACE ";" ", " _vtk_missing_components "${_vtk_missing_components}")
355  set("${CMAKE_FIND_PACKAGE_NAME}_FOUND" 0)
356  set("${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE"
357  "Could not find the ${CMAKE_FIND_PACKAGE_NAME} package with the following required components: ${_vtk_missing_components}.")
358 endif ()
359 unset(_vtk_missing_components)
360 
361 set("${CMAKE_FIND_PACKAGE_NAME}_LIBRARIES")
362 if (NOT DEFINED "${CMAKE_FIND_PACKAGE_NAME}_FOUND")
363  # If nothing went wrong, we've successfully found the package.
364  set("${CMAKE_FIND_PACKAGE_NAME}_FOUND" 1)
365  set(_vtk_found_components
366  ${${CMAKE_FIND_PACKAGE_NAME}_FIND_COMPONENTS})
367  if (NOT _vtk_found_components)
368  set(_vtk_found_components
369  ${${CMAKE_FIND_PACKAGE_NAME}_AVAILABLE_COMPONENTS})
370  endif ()
371  list(REMOVE_ITEM _vtk_found_components
372  # These components need to always be requested explicitly since they are
373  # not modules.
374  WrapHierarchy;vtkbuild;vtkplatform;vtkpython;pvtkpython;WrapPython;WrapPythonInit;vtkjava;ParseJava;WrapJava;vtkWebAssemblyTestLinkOptions)
375  # Build the `_LIBRARIES` variable.
376  foreach (_vtk_component IN LISTS _vtk_found_components)
377  if (TARGET "${CMAKE_FIND_PACKAGE_NAME}::${_vtk_component}")
378  list(APPEND "${CMAKE_FIND_PACKAGE_NAME}_LIBRARIES"
379  "${CMAKE_FIND_PACKAGE_NAME}::${_vtk_component}")
380  endif ()
381  endforeach ()
382  unset(_vtk_component)
383  unset(_vtk_found_components)
384 endif ()
385 
386 set(CMAKE_PREFIX_PATH "${${CMAKE_FIND_PACKAGE_NAME}_CMAKE_PREFIX_PATH_save}")
387 unset("${CMAKE_FIND_PACKAGE_NAME}_CMAKE_PREFIX_PATH_save")
388 
389 set(CMAKE_MODULE_PATH "${${CMAKE_FIND_PACKAGE_NAME}_CMAKE_MODULE_PATH_save}")
390 unset("${CMAKE_FIND_PACKAGE_NAME}_CMAKE_MODULE_PATH_save")
391 
392 foreach (_vtk_temp_variable IN LISTS _vtk_temp_variables)
393  unset("${_vtk_temp_variable}")
394 endforeach ()
395 unset(_vtk_temp_variable)
396 unset(_vtk_temp_variables)
397 
398 # Compatibility with old code.
399 if (NOT ${CMAKE_FIND_PACKAGE_NAME}_FIND_VERSION)
400  set(VTK_USE_FILE "${CMAKE_CURRENT_LIST_DIR}/vtk-use-file-deprecated.cmake")
401 elseif (${CMAKE_FIND_PACKAGE_NAME}_FIND_VERSION VERSION_LESS "8.90")
402  set(VTK_USE_FILE "${CMAKE_CURRENT_LIST_DIR}/vtk-use-file-compat.cmake")
403 else ()
404  set(VTK_USE_FILE "${CMAKE_CURRENT_LIST_DIR}/vtk-use-file-error.cmake")
405 endif ()
406 
407 cmake_policy(POP)
component
boost::graph_traits< vtkGraph *>::vertex_descriptor target(boost::graph_traits< vtkGraph *>::edge_descriptor e, vtkGraph *)
#define VTK_BUILD_VERSION
version
#define VTK_LEGACY_REMOVE
Definition: vtkLegacy.h:27
name
#define VERSION
Definition: jconfigint.h:17
enabled
documentation
#define VTK_MINOR_VERSION
#define VTK_MAJOR_VERSION
#define VTK_VERSION