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_HAS_VTKm: [Deprecated, use VTK_HAS_VISKORES] If VTK provides VTK-m.
16  * `VTK_HAS_VISKORES`: If VTK provides Viskores.
17  * `VTK_OPENGL_HAS_EGL`: If VTK can use EGL for OpenGL context.
18  * `VTK_OPENGL_USE_GLES`: If VTK uses GLES.
19  * `VTK_USE_X`: If VTK uses X windows.
20  * `VTK_USE_COCOA`: If VTK uses Cocoa (only present on APPLE systems).
21  * `VTK_PYTHON_VERSION`: The major version of Python used by VTK. Empty if
22  Python support is not available.
23  * `VTK_WRAP_PYTHON`: If VTK itself provides Python wrapping. If so, the
24  Python parts of the module API are available.
25  * `VTK_WRAP_JAVA`: If VTK itself provides Java wrapping. If so, the
26  Java parts of the module API are available.
27  * `VTK_WRAP_SERIALIZATION`: If VTK itself provides serialization wrappings
28  for marshallable classes in modules with `INCLUDE_MARSHAL`.
29  * `VTK_PYTHONPATH`: Where VTK's Python modules live inside the install
30  prefix. Unset if Python is not available.
31  * `VTK_LIBRARIES`: The list of modules specified by `COMPONENTS` and
32  `OPTIONAL_COMPONENTS`. However, if no components are specified, all
33  available components are added to this variable. This may be used in
34  `MODULES` arguments in the API (e.g., `vtk_module_autoinit`). All modules
35  are also targets and may be linked to using `target_link_libraries`.
36  * `VTK_AUTOINIT_INCLUDE`: The header to include for access to VTK's autoinit
37  support.
38  * `VTK_QT_VERSION`: The major version of Qt used by VTK if Qt support enabled.
39  * `VTK_QML_DIR`: Where VTK's QML plugins live if QML support is enabled.
40  * `VTK_ENABLE_VR_COLLABORATION`: Is VR collaboration enabled when VR is enabled.
41  * `VTK_SMP_BACKENDS`: The list of available SMP backends.
42 
43 For more information about the Python in use by VTK, (note that the `Python`
44 component must be found to guarantee that this happens), see the
45 [FindPython3][] documentation for what is available. Of particular use are
46 likely to be:
47 
48  - the `Python3_VERSION` variable; and
49  - the `Python3::Python` target.
50 
51 [FindPython3]: https://cmake.org/cmake/help/v3.13/module/FindPython3.html
52 [VTK module API]: TODO: Link to hosted documentation.
53 #]==]
54 
55 if (CMAKE_VERSION VERSION_LESS "3.13")
56  set("${CMAKE_FIND_PACKAGE_NAME}_FOUND" 0)
57  set("${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE"
58  "VTK requires CMake 3.13 in order to reliably be used.")
59  return ()
60 endif ()
61 
62 cmake_policy(PUSH)
63 cmake_policy(VERSION 3.13)
64 
65 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;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;h5hut;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;IOAMR;hdf5;GeovisCore;libproj;sqlite;InteractionWidgets;RenderingVolume;RenderingAnnotation;InteractionStyle;ImagingHybrid;FiltersTensor;FiltersTemporal;FiltersPython;FiltersProgrammable;FiltersPoints;FiltersParallelVerdict;FiltersParallelStatistics;FiltersParallelGeometry;FiltersParallelFlowPaths;FiltersParallelDIY2;ParallelDIY;FiltersImaging;ImagingGeneral;FiltersGeometryPreview;FiltersFlowPaths;eigen;FiltersAMR;FiltersParallelMPI;FiltersParallel;FiltersGeneric;FiltersTexture;FiltersModeling;ParallelMPI;mpi;DomainsChemistryOpenGL2;RenderingOpenGL2;RenderingHyperTreeGrid;x11;glad;RenderingLabel;octree;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;jsoncpp;FiltersSources;CommonColor;AcceleratorsVTKmFilters;AcceleratorsVTKmCore;AcceleratorsVTKmDataModel;ImagingCore;FiltersGeneral;FiltersVerdict;verdict;FiltersGeometry;CommonComputationalGeometry;FiltersCore;FiltersReduction;CommonCache;CommonExecutionModel;vtkviskores;CommonDataModel;pegtl;pugixml;CommonSystem;CommonMisc;exprtk;CommonTransforms;CommonMath;kissfft;CommonCore;scn;vtksys;nlohmannjson;fmt;WrapHierarchy;WrapPython;WrapPythonInit;ParseJava;WrapJava")
66 
67 set(_vtk_temp_variables)
68 set(_vtk_real_components)
69 foreach (_vtk_component IN LISTS "${CMAKE_FIND_PACKAGE_NAME}_FIND_COMPONENTS")
70  # Handle component requests that are not VTK.
71  if (NOT _vtk_component IN_LIST "${CMAKE_FIND_PACKAGE_NAME}_AVAILABLE_COMPONENTS")
72  set("${CMAKE_FIND_PACKAGE_NAME}_${_vtk_component}_FOUND" 0)
73  list(APPEND "${CMAKE_FIND_PACKAGE_NAME}_${_vtk_component}_NOT_FOUND_MESSAGE"
74  "The ${_vtk_component} component is not recognized.")
75  endif ()
76  if (_vtk_component MATCHES "^vtk" AND
77  NOT _vtk_component STREQUAL "vtksys" AND
78  NOT _vtk_component STREQUAL "vtkjava")
79  string(SUBSTRING "${_vtk_component}" 3 -1 _vtk_actual_component)
80  if (NOT ${CMAKE_FIND_PACKAGE_NAME}_FIND_VERSION)
81  if (NOT ${CMAKE_FIND_PACKAGE_NAME}_FIND_QUIETLY)
82  message(DEPRECATION
83  "The new name for the '${_vtk_component}' component is "
84  "'${_vtk_actual_component}'")
85  endif ()
86  elseif (${CMAKE_FIND_PACKAGE_NAME}_FIND_VERSION VERSION_LESS "8.90")
87  # Ignore for compatibility.
88  else ()
89  message(FATAL_ERROR
90  "The new name for the '${_vtk_component}' component is "
91  "'${_vtk_actual_component}'. By requesting at least version 8.90, the "
92  "new component names are now required.")
93  endif ()
94  list(APPEND _vtk_real_components
95  "${_vtk_actual_component}")
96  list(APPEND _vtk_temp_variables
97  "${CMAKE_FIND_PACKAGE_NAME}_FIND_REQUIRED_${_vtk_actual_component}")
98  set("${CMAKE_FIND_PACKAGE_NAME}_FIND_REQUIRED_${_vtk_actual_component}"
99  "${${CMAKE_FIND_PACKAGE_NAME}_FIND_REQUIRED_${_vtk_component}}")
100  unset(_vtk_actual_component)
101  else ()
102  list(APPEND _vtk_real_components
103  "${_vtk_component}")
104  endif ()
105 endforeach ()
106 unset(_vtk_component)
107 set("${CMAKE_FIND_PACKAGE_NAME}_FIND_COMPONENTS"
108  ${_vtk_real_components})
109 unset(_vtk_real_components)
110 
111 set("${CMAKE_FIND_PACKAGE_NAME}_CMAKE_MODULE_PATH_save" "${CMAKE_MODULE_PATH}")
112 list(INSERT CMAKE_MODULE_PATH 0
113  "${CMAKE_CURRENT_LIST_DIR}")
114 
115 set("${CMAKE_FIND_PACKAGE_NAME}_CMAKE_PREFIX_PATH_save" "${CMAKE_PREFIX_PATH}")
116 include("${CMAKE_CURRENT_LIST_DIR}/vtk-prefix.cmake")
117 set("${CMAKE_FIND_PACKAGE_NAME}_PREFIX_PATH"
118  "${_vtk_module_import_prefix}")
119 unset(_vtk_module_import_prefix)
120 list(INSERT CMAKE_PREFIX_PATH 0
121  "${${CMAKE_FIND_PACKAGE_NAME}_PREFIX_PATH}")
122 
123 set("${CMAKE_FIND_PACKAGE_NAME}_VERSION" "9.7.20260825")
124 set("${CMAKE_FIND_PACKAGE_NAME}_MAJOR_VERSION" "9")
125 set("${CMAKE_FIND_PACKAGE_NAME}_MINOR_VERSION" "7")
126 set("${CMAKE_FIND_PACKAGE_NAME}_BUILD_VERSION" "20260825")
127 # VTK_DEPRECATED_IN_9_7_0
128 set("${CMAKE_FIND_PACKAGE_NAME}_LEGACY_REMOVE" "0")
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_OPENGL_USE_GLES "OFF")
191 set(VTK_USE_X "ON")
192 if (APPLE AND NOT APPLE_IOS)
193  set(VTK_USE_COCOA "OFF")
194 endif ()
195 
196 if (TARGET VTK::RenderingVR)
197  set("${CMAKE_FIND_PACKAGE_NAME}_ENABLE_VR_COLLABORATION" "")
198 endif ()
199 
200 if () # VTK_QT_VERSION
201  set("${CMAKE_FIND_PACKAGE_NAME}_QT_VERSION" "")
202 endif ()
203 
204 if (0) # vtk_has_qml
205  set("${CMAKE_FIND_PACKAGE_NAME}_QML_DIR" "${${CMAKE_FIND_PACKAGE_NAME}_PREFIX_PATH}/")
206 endif ()
207 
208 include("${CMAKE_CURRENT_LIST_DIR}/vtkModule.cmake")
209 include("${CMAKE_CURRENT_LIST_DIR}/vtkEncodeString.cmake")
210 include("${CMAKE_CURRENT_LIST_DIR}/vtkHashSource.cmake")
211 include("${CMAKE_CURRENT_LIST_DIR}/vtkObjectFactory.cmake")
212 
213 include("${CMAKE_CURRENT_LIST_DIR}/vtkModuleJson.cmake")
214 
215 set("${CMAKE_FIND_PACKAGE_NAME}_PYTHON_VERSION" "3")
216 set("${CMAKE_FIND_PACKAGE_NAME}_WRAP_PYTHON" "ON")
217 if (${CMAKE_FIND_PACKAGE_NAME}_WRAP_PYTHON)
218  include("${CMAKE_CURRENT_LIST_DIR}/VTKPython-targets.cmake")
219  include("${CMAKE_CURRENT_LIST_DIR}/vtkmodules-vtk-python-module-properties.cmake")
220  include("${CMAKE_CURRENT_LIST_DIR}/vtkModuleWrapPython.cmake")
221  set("${CMAKE_FIND_PACKAGE_NAME}_PYTHONPATH" "lib64/python3.13/site-packages")
222 endif ()
223 
224 set("${CMAKE_FIND_PACKAGE_NAME}_WRAP_JAVA" "")
225 if (${CMAKE_FIND_PACKAGE_NAME}_WRAP_JAVA)
226  include("${CMAKE_CURRENT_LIST_DIR}/vtkModuleWrapJava.cmake")
227 
228  if () # VTK_JAVA_JOGL_COMPONENT
229  set(_vtk_find_jogl_args)
230  if (${CMAKE_FIND_PACKAGE_NAME}_FIND_QUIETLY)
231  list(APPEND _vtk_find_jogl_args QUIET)
232  endif ()
233  find_package(JOGL ${_vtk_find_jogl_args})
234  unset(_vtk_find_jogl_args)
235 
236  if (JOGL_FOUND)
237  include("${CMAKE_CURRENT_LIST_DIR}/VTKJava-targets.cmake")
238  set("${CMAKE_FIND_PACKAGE_NAME}_vtkjava_FOUND" 1)
239  else ()
240  set("${CMAKE_FIND_PACKAGE_NAME}_vtkjava_FOUND" 0)
241  set("${CMAKE_FIND_PACKAGE_NAME}_vtkjava_NOT_FOUND_MESSAGE"
242  "JOGL was not found")
243  endif ()
244  endif ()
245 endif ()
246 
247 set("${CMAKE_FIND_PACKAGE_NAME}_WRAP_JAVASCRIPT" "")
248 if (${CMAKE_FIND_PACKAGE_NAME}_WRAP_JAVASCRIPT)
249  include("${CMAKE_CURRENT_LIST_DIR}/VTKJavaScript-targets.cmake")
250  include("${CMAKE_CURRENT_LIST_DIR}/vtkModuleWrapJavaScript.cmake")
251 endif ()
252 
253 set("${CMAKE_FIND_PACKAGE_NAME}_WRAP_SERIALIZATION" "ON")
254 include("${CMAKE_CURRENT_LIST_DIR}/vtkModuleSerialization.cmake")
255 
256 set(_vtk_search_components
257  ${${CMAKE_FIND_PACKAGE_NAME}_FIND_COMPONENTS})
258 if (NOT _vtk_search_components)
259  set(_vtk_search_components
260  ${${CMAKE_FIND_PACKAGE_NAME}_AVAILABLE_COMPONENTS})
261 endif ()
262 list(REMOVE_ITEM _vtk_search_components
263  # These components need to always be requested explicitly since they are
264  # not modules.
265  WrapHierarchy;vtkbuild;vtkplatform;vtkpython;pvtkpython;WrapPython;WrapPythonInit;vtkjava;ParseJava;WrapJava;vtkWebAssemblyTestLinkOptions)
266 set(_vtk_components_to_check)
267 foreach (_vtk_component IN LISTS _vtk_search_components)
268  if (DEFINED "${CMAKE_FIND_PACKAGE_NAME}_${_vtk_component}_FOUND")
269  # It was already not-found (likely due to `find-package` failures).
270  elseif (TARGET "${CMAKE_FIND_PACKAGE_NAME}::${_vtk_component}")
271  list(APPEND _vtk_components_to_check
272  "${_vtk_component}")
273  else ()
274  set("${CMAKE_FIND_PACKAGE_NAME}_${_vtk_component}_FOUND" 0)
275  list(APPEND "${CMAKE_FIND_PACKAGE_NAME}_${_vtk_component}_NOT_FOUND_MESSAGE"
276  "The ${_vtk_component} component is not available.")
277  endif ()
278 endforeach ()
279 unset(_vtk_component)
280 unset(_vtk_search_components)
281 
282 while (_vtk_components_to_check)
283  list(GET _vtk_components_to_check 0 _vtk_component)
284  list(REMOVE_AT _vtk_components_to_check 0)
285  if (DEFINED "${CMAKE_FIND_PACKAGE_NAME}_${_vtk_component}_FOUND")
286  # We've already made a determiniation.
287  continue ()
288  endif ()
289 
290  get_property(_vtk_public_dependencies
291  TARGET "${CMAKE_FIND_PACKAGE_NAME}::${_vtk_component}"
292  PROPERTY "INTERFACE_vtk_module_depends")
293  get_property(_vtk_private_dependencies
294  TARGET "${CMAKE_FIND_PACKAGE_NAME}::${_vtk_component}"
295  PROPERTY "INTERFACE_vtk_module_private_depends")
296  get_property(_vtk_optional_dependencies
297  TARGET "${CMAKE_FIND_PACKAGE_NAME}::${_vtk_component}"
298  PROPERTY "INTERFACE_vtk_module_optional_depends")
299  set(_vtk_dependencies
300  ${_vtk_public_dependencies}
301  ${_vtk_private_dependencies})
302  foreach (_vtk_optional_dependency IN LISTS _vtk_optional_dependencies)
303  if (TARGET "${_vtk_optional_dependency}")
304  list(APPEND _vtk_dependencies
305  "${_vtk_optional_dependency}")
306  endif ()
307  endforeach ()
308  unset(_vtk_public_dependencies)
309  unset(_vtk_private_dependencies)
310  unset(_vtk_optional_dependency)
311  unset(_vtk_optional_dependencies)
312 
313  string(REPLACE "${CMAKE_FIND_PACKAGE_NAME}::" "" _vtk_dependencies "${_vtk_dependencies}")
314  set(_vtk_all_dependencies_checked TRUE)
315  foreach (_vtk_dependency IN LISTS _vtk_dependencies)
316  if (DEFINED "${CMAKE_FIND_PACKAGE_NAME}_${_vtk_dependency}_FOUND")
317  if (NOT ${CMAKE_FIND_PACKAGE_NAME}_${_vtk_dependency}_FOUND)
318  set("${CMAKE_FIND_PACKAGE_NAME}_${_vtk_component}_FOUND" 0)
319  list(APPEND "${CMAKE_FIND_PACKAGE_NAME}_${_vtk_component}_NOT_FOUND_MESSAGE"
320  "Failed to find the ${_vtk_dependency} component.")
321  endif ()
322  else ()
323  # Check its dependencies.
324  list(APPEND _vtk_components_to_check
325  "${_vtk_dependency}")
326  set(_vtk_all_found FALSE)
327  endif ()
328  endforeach ()
329  if (NOT DEFINED "${CMAKE_FIND_PACKAGE_NAME}_${_vtk_component}_FOUND")
330  if (_vtk_all_dependencies_checked)
331  set("${CMAKE_FIND_PACKAGE_NAME}_${_vtk_component}_FOUND" 1)
332  else ()
333  list(APPEND _vtk_components_to_check
334  "${_vtk_component}")
335  endif ()
336  endif ()
337  unset(_vtk_all_dependencies_checked)
338  unset(_vtk_dependency)
339  unset(_vtk_dependencies)
340 endwhile ()
341 unset(_vtk_component)
342 unset(_vtk_components_to_check)
343 
344 set(_vtk_missing_components)
345 foreach (_vtk_component IN LISTS "${CMAKE_FIND_PACKAGE_NAME}_FIND_COMPONENTS")
346  if (NOT ${CMAKE_FIND_PACKAGE_NAME}_${_vtk_component}_FOUND AND ${CMAKE_FIND_PACKAGE_NAME}_FIND_REQUIRED_${_vtk_component})
347  list(APPEND _vtk_missing_components
348  "${_vtk_component}")
349  endif ()
350 endforeach ()
351 
352 if (_vtk_missing_components)
353  list(REMOVE_DUPLICATES _vtk_missing_components)
354  list(SORT _vtk_missing_components)
355  string(REPLACE ";" ", " _vtk_missing_components "${_vtk_missing_components}")
356  set("${CMAKE_FIND_PACKAGE_NAME}_FOUND" 0)
357  set("${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE"
358  "Could not find the ${CMAKE_FIND_PACKAGE_NAME} package with the following required components: ${_vtk_missing_components}.")
359 endif ()
360 unset(_vtk_missing_components)
361 
362 set("${CMAKE_FIND_PACKAGE_NAME}_LIBRARIES")
363 if (NOT DEFINED "${CMAKE_FIND_PACKAGE_NAME}_FOUND")
364  # If nothing went wrong, we've successfully found the package.
365  set("${CMAKE_FIND_PACKAGE_NAME}_FOUND" 1)
366  set(_vtk_found_components
367  ${${CMAKE_FIND_PACKAGE_NAME}_FIND_COMPONENTS})
368  if (NOT _vtk_found_components)
369  set(_vtk_found_components
370  ${${CMAKE_FIND_PACKAGE_NAME}_AVAILABLE_COMPONENTS})
371  endif ()
372  list(REMOVE_ITEM _vtk_found_components
373  # These components need to always be requested explicitly since they are
374  # not modules.
375  WrapHierarchy;vtkbuild;vtkplatform;vtkpython;pvtkpython;WrapPython;WrapPythonInit;vtkjava;ParseJava;WrapJava;vtkWebAssemblyTestLinkOptions)
376  # Build the `_LIBRARIES` variable.
377  foreach (_vtk_component IN LISTS _vtk_found_components)
378  if (TARGET "${CMAKE_FIND_PACKAGE_NAME}::${_vtk_component}")
379  list(APPEND "${CMAKE_FIND_PACKAGE_NAME}_LIBRARIES"
380  "${CMAKE_FIND_PACKAGE_NAME}::${_vtk_component}")
381  endif ()
382  endforeach ()
383  unset(_vtk_component)
384  unset(_vtk_found_components)
385 endif ()
386 
387 set(CMAKE_PREFIX_PATH "${${CMAKE_FIND_PACKAGE_NAME}_CMAKE_PREFIX_PATH_save}")
388 unset("${CMAKE_FIND_PACKAGE_NAME}_CMAKE_PREFIX_PATH_save")
389 
390 set(CMAKE_MODULE_PATH "${${CMAKE_FIND_PACKAGE_NAME}_CMAKE_MODULE_PATH_save}")
391 unset("${CMAKE_FIND_PACKAGE_NAME}_CMAKE_MODULE_PATH_save")
392 
393 foreach (_vtk_temp_variable IN LISTS _vtk_temp_variables)
394  unset("${_vtk_temp_variable}")
395 endforeach ()
396 unset(_vtk_temp_variable)
397 unset(_vtk_temp_variables)
398 
399 # Compatibility with old code.
400 if (NOT ${CMAKE_FIND_PACKAGE_NAME}_FIND_VERSION)
401  set(VTK_USE_FILE "${CMAKE_CURRENT_LIST_DIR}/vtk-use-file-deprecated.cmake")
402 elseif (${CMAKE_FIND_PACKAGE_NAME}_FIND_VERSION VERSION_LESS "8.90")
403  set(VTK_USE_FILE "${CMAKE_CURRENT_LIST_DIR}/vtk-use-file-compat.cmake")
404 else ()
405  set(VTK_USE_FILE "${CMAKE_CURRENT_LIST_DIR}/vtk-use-file-error.cmake")
406 endif ()
407 
408 cmake_policy(POP)
component
#define VTK_BUILD_VERSION
version
enabled
#define VTK_MINOR_VERSION
#define VTK_MAJOR_VERSION
#define VTK_VERSION
#define VTK_USE_X
#define VTK_OPENGL_HAS_EGL