2013-10-15 19:17:36 +04:00
|
|
|
#.rst:
|
|
|
|
# FindITK
|
|
|
|
# -------
|
|
|
|
#
|
|
|
|
# Find an ITK installation or build tree.
|
2005-12-15 18:41:19 +03:00
|
|
|
|
2002-11-07 02:40:13 +03:00
|
|
|
# When ITK is found, the ITKConfig.cmake file is sourced to setup the
|
|
|
|
# location and configuration of ITK. Please read this file, or
|
|
|
|
# ITKConfig.cmake.in from the ITK source tree for the full list of
|
2005-12-15 18:41:19 +03:00
|
|
|
# definitions. Of particular interest is ITK_USE_FILE, a CMake source file
|
|
|
|
# that can be included to set the include directories, library directories,
|
|
|
|
# and preprocessor macros. In addition to the variables read from
|
|
|
|
# ITKConfig.cmake, this find module also defines
|
2012-08-13 21:42:58 +04:00
|
|
|
# ITK_DIR - The directory containing ITKConfig.cmake.
|
|
|
|
# This is either the root of the build tree,
|
|
|
|
# or the lib/InsightToolkit directory.
|
2005-12-15 18:41:19 +03:00
|
|
|
# This is the only cache entry.
|
2012-08-13 21:42:58 +04:00
|
|
|
#
|
|
|
|
# ITK_FOUND - Whether ITK was found. If this is true,
|
2005-12-15 18:41:19 +03:00
|
|
|
# ITK_DIR is okay.
|
2005-12-14 21:51:08 +03:00
|
|
|
#
|
2012-08-13 21:42:58 +04:00
|
|
|
# USE_ITK_FILE - The full path to the UseITK.cmake file.
|
|
|
|
# This is provided for backward
|
2012-11-07 20:13:09 +04:00
|
|
|
# compatibility. Use ITK_USE_FILE
|
2005-12-15 18:41:19 +03:00
|
|
|
# instead.
|
2005-12-14 21:51:08 +03:00
|
|
|
|
2009-09-28 19:45:50 +04:00
|
|
|
#=============================================================================
|
2010-11-22 21:52:58 +03:00
|
|
|
# Copyright 2001-2010 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.)
|
2002-11-07 02:40:13 +03:00
|
|
|
|
2010-11-22 21:52:58 +03:00
|
|
|
# Use the Config mode of the find_package() command to find ITKConfig.
|
|
|
|
# If this succeeds (possibly because ITK_DIR is already set), the
|
|
|
|
# command will have already loaded ITKConfig.cmake and set ITK_FOUND.
|
2012-08-13 21:47:32 +04:00
|
|
|
if(NOT ITK_FOUND)
|
|
|
|
set(_ITK_REQUIRED "")
|
|
|
|
if(ITK_FIND_REQUIRED)
|
|
|
|
set(_ITK_REQUIRED REQUIRED)
|
|
|
|
endif()
|
|
|
|
set(_ITK_QUIET "")
|
|
|
|
if(ITK_FIND_QUIETLY)
|
|
|
|
set(_ITK_QUIET QUIET)
|
|
|
|
endif()
|
|
|
|
find_package(ITK ${_ITK_REQUIRED} ${_ITK_QUIET} NO_MODULE
|
2010-11-22 21:52:58 +03:00
|
|
|
NAMES ITK InsightToolkit
|
|
|
|
CONFIGS ITKConfig.cmake
|
|
|
|
)
|
2012-08-13 21:47:32 +04:00
|
|
|
endif()
|
2004-04-21 19:33:47 +04:00
|
|
|
|
2012-08-13 21:47:32 +04:00
|
|
|
if(ITK_FOUND)
|
2012-11-07 20:13:09 +04:00
|
|
|
# Set USE_ITK_FILE for backward-compatibility.
|
2012-08-13 21:47:32 +04:00
|
|
|
set(USE_ITK_FILE ${ITK_USE_FILE})
|
|
|
|
endif()
|