2013-10-15 19:17:36 +04:00
|
|
|
#.rst:
|
|
|
|
# FindVTK
|
|
|
|
# -------
|
|
|
|
#
|
|
|
|
# Find a VTK installation or build tree.
|
|
|
|
#
|
|
|
|
# The following variables are set if VTK is found. If VTK is not found,
|
|
|
|
# VTK_FOUND is set to false.
|
|
|
|
#
|
|
|
|
# ::
|
|
|
|
#
|
|
|
|
# VTK_FOUND - Set to true when VTK is found.
|
|
|
|
#
|
2002-12-05 18:47:18 +03:00
|
|
|
# The following cache entries must be set by the user to locate VTK:
|
2001-09-19 22:52:59 +04:00
|
|
|
#
|
2013-10-15 19:17:36 +04:00
|
|
|
# ::
|
|
|
|
#
|
|
|
|
# VTK_DIR - The directory containing VTKConfig.cmake.
|
|
|
|
# This is either the root of the build tree,
|
|
|
|
# or the lib/vtk directory. This is the
|
|
|
|
# only cache entry.
|
|
|
|
#
|
|
|
|
# The following variables are set for backward compatibility and should
|
|
|
|
# not be used in new code:
|
|
|
|
#
|
|
|
|
# ::
|
|
|
|
#
|
|
|
|
# USE_VTK_FILE - The full path to the UseVTK.cmake file.
|
|
|
|
# This is provided for backward
|
|
|
|
# compatibility. Use VTK_USE_FILE
|
|
|
|
# instead.
|
2001-12-21 22:40:33 +03:00
|
|
|
|
2009-09-28 19:45:50 +04:00
|
|
|
#=============================================================================
|
2014-06-27 18:35:35 +04:00
|
|
|
# Copyright 2001-2014 Kitware, Inc.
|
2009-09-28 19:45:50 +04:00
|
|
|
#
|
|
|
|
# Distributed under the OSI-approved BSD License (the "License");
|
|
|
|
# see accompanying file Copyright.txt for details.
|
|
|
|
#
|
|
|
|
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
|
|
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
# See the License for more information.
|
|
|
|
#=============================================================================
|
2010-08-07 04:48:47 +04:00
|
|
|
# (To distribute this file outside of CMake, substitute the full
|
2009-09-28 19:45:50 +04:00
|
|
|
# License text for the above reference.)
|
|
|
|
|
2009-10-07 22:48:22 +04:00
|
|
|
# Use the Config mode of the find_package() command to find VTKConfig.
|
|
|
|
# If this succeeds (possibly because VTK_DIR is already set), the
|
|
|
|
# command will have already loaded VTKConfig.cmake and set VTK_FOUND.
|
2014-06-27 18:35:35 +04:00
|
|
|
if(NOT VTK_FOUND)
|
|
|
|
set(_VTK_REQUIRED "")
|
|
|
|
if(VTK_FIND_REQUIRED)
|
|
|
|
set(_VTK_REQUIRED REQUIRED)
|
2012-08-13 21:50:14 +04:00
|
|
|
endif()
|
2014-06-27 18:35:35 +04:00
|
|
|
set(_VTK_QUIET "")
|
|
|
|
if(VTK_FIND_QUIETLY)
|
|
|
|
set(_VTK_QUIET QUIET)
|
2012-08-13 21:47:32 +04:00
|
|
|
endif()
|
2014-06-27 18:35:35 +04:00
|
|
|
find_package(VTK ${_VTK_REQUIRED} ${_VTK_QUIET} NO_MODULE)
|
|
|
|
unset(_VTK_REQUIRED)
|
|
|
|
unset(_VTK_QUIET)
|
2012-08-13 21:47:32 +04:00
|
|
|
endif()
|
2002-11-20 21:37:52 +03:00
|
|
|
|
2012-08-13 21:47:32 +04:00
|
|
|
if(VTK_FOUND)
|
2012-11-07 20:13:09 +04:00
|
|
|
# Set USE_VTK_FILE for backward-compatibility.
|
2012-08-13 21:47:32 +04:00
|
|
|
set(USE_VTK_FILE ${VTK_USE_FILE})
|
2012-08-13 21:50:14 +04:00
|
|
|
endif()
|