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_USE_X`: If VTK uses X windows.
19  * `VTK_USE_COCOA`: If VTK uses Cocoa (only present on APPLE systems).
20  * `VTK_PYTHON_VERSION`: The major version of Python used by VTK. Empty if
21  Python support is not available.
22  * `VTK_WRAP_PYTHON`: If VTK itself provides Python wrapping. If so, the
23  Python parts of the module API are available.
24  * `VTK_WRAP_JAVA`: If VTK itself provides Java wrapping. If so, the
25  Java parts of the module API are available.
26  * `VTK_WRAP_SERIALIZATION`: If VTK itself provides serialization wrappings
27  for marshallable classes in modules with `INCLUDE_MARSHAL`.
28  * `VTK_PYTHONPATH`: Where VTK's Python modules live inside the install
29  prefix. Unset if Python is not available.
30  * `VTK_LIBRARIES`: The list of modules specified by `COMPONENTS` and
31  `OPTIONAL_COMPONENTS`. However, if no components are specified, all
32  available components are added to this variable. This may be used in
33  `MODULES` arguments in the API (e.g., `vtk_module_autoinit`). All modules
34  are also targets and may be linked to using `target_link_libraries`.
35  * `VTK_AUTOINIT_INCLUDE`: The header to include for access to VTK's autoinit
36  support.
37  * `VTK_QT_VERSION`: The major version of Qt used by VTK if Qt support enabled.
38  * `VTK_QML_DIR`: Where VTK's QML plugins live if QML support is enabled.
39  * `VTK_ENABLE_VR_COLLABORATION`: Is VR collaboration enabled when VR is enabled.
40  * `VTK_SMP_BACKENDS`: The list of available SMP backends.
41 
42 For more information about the Python in use by VTK, (note that the `Python`
43 component must be found to guarantee that this happens), see the
44 [FindPython3][] documentation for what is available. Of particular use are
45 likely to be:
46 
47  - the `Python3_VERSION` variable; and
48  - the `Python3::Python` target.
49 
50 [FindPython3]: https://cmake.org/cmake/help/v3.13/module/FindPython3.html
51 [VTK module API]: TODO: Link to hosted documentation.
52 #]==]
53 
54 if (CMAKE_VERSION VERSION_LESS "3.12")
55  set("${CMAKE_FIND_PACKAGE_NAME}_FOUND" 0)
56  set("${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE"
57  "VTK requires CMake 3.12 in order to reliably be used.")
58  return ()
59 endif ()
60 
61 cmake_policy(PUSH)
62 cmake_policy(VERSION 3.12)
63 
64 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;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;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")
65 
66 set(_vtk_temp_variables)
67 set(_vtk_real_components)
68 foreach (_vtk_component IN LISTS "${CMAKE_FIND_PACKAGE_NAME}_FIND_COMPONENTS")
69  # Handle component requests that are not VTK.
70  if (NOT _vtk_component IN_LIST "${CMAKE_FIND_PACKAGE_NAME}_AVAILABLE_COMPONENTS")
71  set("${CMAKE_FIND_PACKAGE_NAME}_${_vtk_component}_FOUND" 0)
72  list(APPEND "${CMAKE_FIND_PACKAGE_NAME}_${_vtk_component}_NOT_FOUND_MESSAGE"
73  "The ${_vtk_component} component is not recognized.")
74  endif ()
75  if (_vtk_component MATCHES "^vtk" AND
76  NOT _vtk_component STREQUAL "vtksys" AND
77  NOT _vtk_component STREQUAL "vtkjava")
78  string(SUBSTRING "${_vtk_component}" 3 -1 _vtk_actual_component)
79  if (NOT ${CMAKE_FIND_PACKAGE_NAME}_FIND_VERSION)
80  if (NOT ${CMAKE_FIND_PACKAGE_NAME}_FIND_QUIETLY)
81  message(DEPRECATION
82  "The new name for the '${_vtk_component}' component is "
83  "'${_vtk_actual_component}'")
84  endif ()
85  elseif (${CMAKE_FIND_PACKAGE_NAME}_FIND_VERSION VERSION_LESS "8.90")
86  # Ignore for compatibility.
87  else ()
88  message(FATAL_ERROR
89  "The new name for the '${_vtk_component}' component is "
90  "'${_vtk_actual_component}'. By requesting at least version 8.90, the "
91  "new component names are now required.")
92  endif ()
93  list(APPEND _vtk_real_components
94  "${_vtk_actual_component}")
95  list(APPEND _vtk_temp_variables
96  "${CMAKE_FIND_PACKAGE_NAME}_FIND_REQUIRED_${_vtk_actual_component}")
97  set("${CMAKE_FIND_PACKAGE_NAME}_FIND_REQUIRED_${_vtk_actual_component}"
98  "${${CMAKE_FIND_PACKAGE_NAME}_FIND_REQUIRED_${_vtk_component}}")
99  unset(_vtk_actual_component)
100  else ()
101  list(APPEND _vtk_real_components
102  "${_vtk_component}")
103  endif ()
104 endforeach ()
105 unset(_vtk_component)
106 set("${CMAKE_FIND_PACKAGE_NAME}_FIND_COMPONENTS"
107  ${_vtk_real_components})
108 unset(_vtk_real_components)
109 
110 set("${CMAKE_FIND_PACKAGE_NAME}_CMAKE_MODULE_PATH_save" "${CMAKE_MODULE_PATH}")
111 list(INSERT CMAKE_MODULE_PATH 0
112  "${CMAKE_CURRENT_LIST_DIR}")
113 
114 set("${CMAKE_FIND_PACKAGE_NAME}_CMAKE_PREFIX_PATH_save" "${CMAKE_PREFIX_PATH}")
115 include("${CMAKE_CURRENT_LIST_DIR}/vtk-prefix.cmake")
116 set("${CMAKE_FIND_PACKAGE_NAME}_PREFIX_PATH"
117  "${_vtk_module_import_prefix}")
118 unset(_vtk_module_import_prefix)
119 list(INSERT CMAKE_PREFIX_PATH 0
120  "${${CMAKE_FIND_PACKAGE_NAME}_PREFIX_PATH}")
121 
122 set("${CMAKE_FIND_PACKAGE_NAME}_VERSION" "9.6.20260129")
123 set("${CMAKE_FIND_PACKAGE_NAME}_MAJOR_VERSION" "9")
124 set("${CMAKE_FIND_PACKAGE_NAME}_MINOR_VERSION" "6")
125 set("${CMAKE_FIND_PACKAGE_NAME}_BUILD_VERSION" "20260129")
126 # VTK_DEPRECATED_IN_9_7_0
127 set("${CMAKE_FIND_PACKAGE_NAME}_LEGACY_REMOVE" "0")
128 set("${CMAKE_FIND_PACKAGE_NAME}_AUTOINIT_INCLUDE" "\"vtkAutoInit.h\"")
129 set("${CMAKE_FIND_PACKAGE_NAME}_SMP_BACKENDS" "STDThread;Sequential")
130 
131 unset("${CMAKE_FIND_PACKAGE_NAME}_FOUND")
132 set("${CMAKE_FIND_PACKAGE_NAME}_HAS_VISKORES" "ON")
133 set("${CMAKE_FIND_PACKAGE_NAME}_HAS_VTKm" "ON")
134 if (${CMAKE_FIND_PACKAGE_NAME}_HAS_VISKORES)
135  if (NOT "OFF") # VTK_MODULE_USE_EXTERNAL_VTK_vtkviskores
136  find_package(Viskores
137  PATHS "${CMAKE_CURRENT_LIST_DIR}/viskores"
138  NO_DEFAULT_PATH)
139  if (NOT Viskores_FOUND)
140  set("${CMAKE_FIND_PACKAGE_NAME}_FOUND" 0)
141  set("${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE" "VTK internal enabled Viskores cannot be founded")
142  endif ()
143  endif ()
144 endif ()
145 
146 include("${CMAKE_CURRENT_LIST_DIR}/vtkCMakeBackports.cmake")
147 include("${CMAKE_CURRENT_LIST_DIR}/${CMAKE_FIND_PACKAGE_NAME}-targets.cmake")
148 include("${CMAKE_CURRENT_LIST_DIR}/${CMAKE_FIND_PACKAGE_NAME}-vtk-module-properties.cmake")
149 
150 include("${CMAKE_CURRENT_LIST_DIR}/vtk-find-package-helpers.cmake" OPTIONAL)
151 
152 # Ensure that the right OpenGL preference is in place when finding the OpenGL
153 # libraries.
154 if (0) # vtk_opengl_preference_set
155  if (DEFINED OpenGL_GL_PREFERENCE)
156  set("${CMAKE_FIND_PACKAGE_NAME}_OpenGL_GL_PREFERENCE_save" "${OpenGL_GL_PREFERENCE}")
157  endif ()
158  set(OpenGL_GL_PREFERENCE "")
159 endif ()
160 
161 # Ensure that python is found based on location, not on version
162 # See https://cmake.org/cmake/help/latest/module/FindPython.html
163 if (DEFINED Python3_FIND_STRATEGY)
164  set("${CMAKE_FIND_PACKAGE_NAME}_Python3_FIND_STRATEGY_save" "${Python3_FIND_STRATEGY}")
165 endif ()
166 set(Python3_FIND_STRATEGY LOCATION)
167 
168 # Ensures that the OpenGL::GLES3 is found.
169 include("${CMAKE_CURRENT_LIST_DIR}/vtkMobileDevices.cmake")
170 include("${CMAKE_CURRENT_LIST_DIR}/${CMAKE_FIND_PACKAGE_NAME}-vtk-module-find-packages.cmake")
171 
172 if (0) # vtk_opengl_preference_set
173  if (DEFINED "${CMAKE_FIND_PACKAGE_NAME}_OpenGL_GL_PREFERENCE_save")
174  set(OpenGL_GL_PREFERENCE "${${CMAKE_FIND_PACKAGE_NAME}_OpenGL_GL_PREFERENCE_save}")
175  unset("${CMAKE_FIND_PACKAGE_NAME}_OpenGL_GL_PREFERENCE_save")
176  else ()
177  unset(OpenGL_GL_PREFERENCE)
178  endif ()
179 endif ()
180 
181 if (DEFINED "${CMAKE_FIND_PACKAGE_NAME}_Python3_FIND_STRATEGY_save")
182  set(Python3_FIND_STRATEGY "${${CMAKE_FIND_PACKAGE_NAME}_Python3_FIND_STRATEGY_save}")
183  unset("${CMAKE_FIND_PACKAGE_NAME}_Python3_FIND_STRATEGY_save")
184 else ()
185  unset(Python3_FIND_STRATEGY)
186 endif ()
187 
188 set(VTK_OPENGL_HAS_EGL "ON")
189 set(VTK_USE_X "ON")
190 if (APPLE AND NOT APPLE_IOS)
191  set(VTK_USE_COCOA "OFF")
192 endif ()
193 
194 if (TARGET VTK::RenderingVR)
195  set("${CMAKE_FIND_PACKAGE_NAME}_ENABLE_VR_COLLABORATION" "")
196 endif ()
197 
198 if () # VTK_QT_VERSION
199  set("${CMAKE_FIND_PACKAGE_NAME}_QT_VERSION" "")
200 endif ()
201 
202 if (0) # vtk_has_qml
203  set("${CMAKE_FIND_PACKAGE_NAME}_QML_DIR" "${${CMAKE_FIND_PACKAGE_NAME}_PREFIX_PATH}/")
204 endif ()
205 
206 include("${CMAKE_CURRENT_LIST_DIR}/vtkModule.cmake")
207 include("${CMAKE_CURRENT_LIST_DIR}/vtkEncodeString.cmake")
208 include("${CMAKE_CURRENT_LIST_DIR}/vtkHashSource.cmake")
209 include("${CMAKE_CURRENT_LIST_DIR}/vtkObjectFactory.cmake")
210 
211 include("${CMAKE_CURRENT_LIST_DIR}/vtkModuleJson.cmake")
212 
213 set("${CMAKE_FIND_PACKAGE_NAME}_PYTHON_VERSION" "3")
214 set("${CMAKE_FIND_PACKAGE_NAME}_WRAP_PYTHON" "ON")
215 if (${CMAKE_FIND_PACKAGE_NAME}_WRAP_PYTHON)
216  include("${CMAKE_CURRENT_LIST_DIR}/VTKPython-targets.cmake")
217  include("${CMAKE_CURRENT_LIST_DIR}/vtkmodules-vtk-python-module-properties.cmake")
218  include("${CMAKE_CURRENT_LIST_DIR}/vtkModuleWrapPython.cmake")
219  set("${CMAKE_FIND_PACKAGE_NAME}_PYTHONPATH" "lib64/python3.13/site-packages")
220 endif ()
221 
222 set("${CMAKE_FIND_PACKAGE_NAME}_WRAP_JAVA" "")
223 if (${CMAKE_FIND_PACKAGE_NAME}_WRAP_JAVA)
224  include("${CMAKE_CURRENT_LIST_DIR}/vtkModuleWrapJava.cmake")
225 
226  if () # VTK_JAVA_JOGL_COMPONENT
227  set(_vtk_find_jogl_args)
228  if (${CMAKE_FIND_PACKAGE_NAME}_FIND_QUIETLY)
229  list(APPEND _vtk_find_jogl_args QUIET)
230  endif ()
231  find_package(JOGL ${_vtk_find_jogl_args})
232  unset(_vtk_find_jogl_args)
233 
234  if (JOGL_FOUND)
235  include("${CMAKE_CURRENT_LIST_DIR}/VTKJava-targets.cmake")
236  set("${CMAKE_FIND_PACKAGE_NAME}_vtkjava_FOUND" 1)
237  else ()
238  set("${CMAKE_FIND_PACKAGE_NAME}_vtkjava_FOUND" 0)
239  set("${CMAKE_FIND_PACKAGE_NAME}_vtkjava_NOT_FOUND_MESSAGE"
240  "JOGL was not found")
241  endif ()
242  endif ()
243 endif ()
244 
245 set("${CMAKE_FIND_PACKAGE_NAME}_WRAP_JAVASCRIPT" "")
246 if (${CMAKE_FIND_PACKAGE_NAME}_WRAP_JAVASCRIPT)
247  include("${CMAKE_CURRENT_LIST_DIR}/VTKJavaScript-targets.cmake")
248  include("${CMAKE_CURRENT_LIST_DIR}/vtkModuleWrapJavaScript.cmake")
249 endif ()
250 
251 set("${CMAKE_FIND_PACKAGE_NAME}_WRAP_SERIALIZATION" "ON")
252 include("${CMAKE_CURRENT_LIST_DIR}/vtkModuleSerialization.cmake")
253 
254 set(_vtk_search_components
255  ${${CMAKE_FIND_PACKAGE_NAME}_FIND_COMPONENTS})
256 if (NOT _vtk_search_components)
257  set(_vtk_search_components
258  ${${CMAKE_FIND_PACKAGE_NAME}_AVAILABLE_COMPONENTS})
259 endif ()
260 list(REMOVE_ITEM _vtk_search_components
261  # These components need to always be requested explicitly since they are
262  # not modules.
263  WrapHierarchy;vtkbuild;vtkplatform;vtkpython;pvtkpython;WrapPython;WrapPythonInit;vtkjava;ParseJava;WrapJava;vtkWebAssemblyTestLinkOptions)
264 set(_vtk_components_to_check)
265 foreach (_vtk_component IN LISTS _vtk_search_components)
266  if (DEFINED "${CMAKE_FIND_PACKAGE_NAME}_${_vtk_component}_FOUND")
267  # It was already not-found (likely due to `find-package` failures).
268  elseif (TARGET "${CMAKE_FIND_PACKAGE_NAME}::${_vtk_component}")
269  list(APPEND _vtk_components_to_check
270  "${_vtk_component}")
271  else ()
272  set("${CMAKE_FIND_PACKAGE_NAME}_${_vtk_component}_FOUND" 0)
273  list(APPEND "${CMAKE_FIND_PACKAGE_NAME}_${_vtk_component}_NOT_FOUND_MESSAGE"
274  "The ${_vtk_component} component is not available.")
275  endif ()
276 endforeach ()
277 unset(_vtk_component)
278 unset(_vtk_search_components)
279 
280 while (_vtk_components_to_check)
281  list(GET _vtk_components_to_check 0 _vtk_component)
282  list(REMOVE_AT _vtk_components_to_check 0)
283  if (DEFINED "${CMAKE_FIND_PACKAGE_NAME}_${_vtk_component}_FOUND")
284  # We've already made a determiniation.
285  continue ()
286  endif ()
287 
288  get_property(_vtk_public_dependencies
289  TARGET "${CMAKE_FIND_PACKAGE_NAME}::${_vtk_component}"
290  PROPERTY "INTERFACE_vtk_module_depends")
291  get_property(_vtk_private_dependencies
292  TARGET "${CMAKE_FIND_PACKAGE_NAME}::${_vtk_component}"
293  PROPERTY "INTERFACE_vtk_module_private_depends")
294  get_property(_vtk_optional_dependencies
295  TARGET "${CMAKE_FIND_PACKAGE_NAME}::${_vtk_component}"
296  PROPERTY "INTERFACE_vtk_module_optional_depends")
297  set(_vtk_dependencies
298  ${_vtk_public_dependencies}
299  ${_vtk_private_dependencies})
300  foreach (_vtk_optional_dependency IN LISTS _vtk_optional_dependencies)
301  if (TARGET "${_vtk_optional_dependency}")
302  list(APPEND _vtk_dependencies
303  "${_vtk_optional_dependency}")
304  endif ()
305  endforeach ()
306  unset(_vtk_public_dependencies)
307  unset(_vtk_private_dependencies)
308  unset(_vtk_optional_dependency)
309  unset(_vtk_optional_dependencies)
310 
311  string(REPLACE "${CMAKE_FIND_PACKAGE_NAME}::" "" _vtk_dependencies "${_vtk_dependencies}")
312  set(_vtk_all_dependencies_checked TRUE)
313  foreach (_vtk_dependency IN LISTS _vtk_dependencies)
314  if (DEFINED "${CMAKE_FIND_PACKAGE_NAME}_${_vtk_dependency}_FOUND")
315  if (NOT ${CMAKE_FIND_PACKAGE_NAME}_${_vtk_dependency}_FOUND)
316  set("${CMAKE_FIND_PACKAGE_NAME}_${_vtk_component}_FOUND" 0)
317  list(APPEND "${CMAKE_FIND_PACKAGE_NAME}_${_vtk_component}_NOT_FOUND_MESSAGE"
318  "Failed to find the ${_vtk_dependency} component.")
319  endif ()
320  else ()
321  # Check its dependencies.
322  list(APPEND _vtk_components_to_check
323  "${_vtk_dependency}")
324  set(_vtk_all_found FALSE)
325  endif ()
326  endforeach ()
327  if (NOT DEFINED "${CMAKE_FIND_PACKAGE_NAME}_${_vtk_component}_FOUND")
328  if (_vtk_all_dependencies_checked)
329  set("${CMAKE_FIND_PACKAGE_NAME}_${_vtk_component}_FOUND" 1)
330  else ()
331  list(APPEND _vtk_components_to_check
332  "${_vtk_component}")
333  endif ()
334  endif ()
335  unset(_vtk_all_dependencies_checked)
336  unset(_vtk_dependency)
337  unset(_vtk_dependencies)
338 endwhile ()
339 unset(_vtk_component)
340 unset(_vtk_components_to_check)
341 
342 set(_vtk_missing_components)
343 foreach (_vtk_component IN LISTS "${CMAKE_FIND_PACKAGE_NAME}_FIND_COMPONENTS")
344  if (NOT ${CMAKE_FIND_PACKAGE_NAME}_${_vtk_component}_FOUND AND ${CMAKE_FIND_PACKAGE_NAME}_FIND_REQUIRED_${_vtk_component})
345  list(APPEND _vtk_missing_components
346  "${_vtk_component}")
347  endif ()
348 endforeach ()
349 
350 if (_vtk_missing_components)
351  list(REMOVE_DUPLICATES _vtk_missing_components)
352  list(SORT _vtk_missing_components)
353  string(REPLACE ";" ", " _vtk_missing_components "${_vtk_missing_components}")
354  set("${CMAKE_FIND_PACKAGE_NAME}_FOUND" 0)
355  set("${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE"
356  "Could not find the ${CMAKE_FIND_PACKAGE_NAME} package with the following required components: ${_vtk_missing_components}.")
357 endif ()
358 unset(_vtk_missing_components)
359 
360 set("${CMAKE_FIND_PACKAGE_NAME}_LIBRARIES")
361 if (NOT DEFINED "${CMAKE_FIND_PACKAGE_NAME}_FOUND")
362  # If nothing went wrong, we've successfully found the package.
363  set("${CMAKE_FIND_PACKAGE_NAME}_FOUND" 1)
364  set(_vtk_found_components
365  ${${CMAKE_FIND_PACKAGE_NAME}_FIND_COMPONENTS})
366  if (NOT _vtk_found_components)
367  set(_vtk_found_components
368  ${${CMAKE_FIND_PACKAGE_NAME}_AVAILABLE_COMPONENTS})
369  endif ()
370  list(REMOVE_ITEM _vtk_found_components
371  # These components need to always be requested explicitly since they are
372  # not modules.
373  WrapHierarchy;vtkbuild;vtkplatform;vtkpython;pvtkpython;WrapPython;WrapPythonInit;vtkjava;ParseJava;WrapJava;vtkWebAssemblyTestLinkOptions)
374  # Build the `_LIBRARIES` variable.
375  foreach (_vtk_component IN LISTS _vtk_found_components)
376  if (TARGET "${CMAKE_FIND_PACKAGE_NAME}::${_vtk_component}")
377  list(APPEND "${CMAKE_FIND_PACKAGE_NAME}_LIBRARIES"
378  "${CMAKE_FIND_PACKAGE_NAME}::${_vtk_component}")
379  endif ()
380  endforeach ()
381  unset(_vtk_component)
382  unset(_vtk_found_components)
383 endif ()
384 
385 set(CMAKE_PREFIX_PATH "${${CMAKE_FIND_PACKAGE_NAME}_CMAKE_PREFIX_PATH_save}")
386 unset("${CMAKE_FIND_PACKAGE_NAME}_CMAKE_PREFIX_PATH_save")
387 
388 set(CMAKE_MODULE_PATH "${${CMAKE_FIND_PACKAGE_NAME}_CMAKE_MODULE_PATH_save}")
389 unset("${CMAKE_FIND_PACKAGE_NAME}_CMAKE_MODULE_PATH_save")
390 
391 foreach (_vtk_temp_variable IN LISTS _vtk_temp_variables)
392  unset("${_vtk_temp_variable}")
393 endforeach ()
394 unset(_vtk_temp_variable)
395 unset(_vtk_temp_variables)
396 
397 # Compatibility with old code.
398 if (NOT ${CMAKE_FIND_PACKAGE_NAME}_FIND_VERSION)
399  set(VTK_USE_FILE "${CMAKE_CURRENT_LIST_DIR}/vtk-use-file-deprecated.cmake")
400 elseif (${CMAKE_FIND_PACKAGE_NAME}_FIND_VERSION VERSION_LESS "8.90")
401  set(VTK_USE_FILE "${CMAKE_CURRENT_LIST_DIR}/vtk-use-file-compat.cmake")
402 else ()
403  set(VTK_USE_FILE "${CMAKE_CURRENT_LIST_DIR}/vtk-use-file-error.cmake")
404 endif ()
405 
406 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