1 # - Find an ITK installation or build tree.
3 # When ITK is found, the ITKConfig.cmake file is sourced to setup the
4 # location and configuration of ITK. Please read this file, or
5 # ITKConfig.cmake.in from the ITK source tree for the full list of
6 # definitions. Of particular interest is ITK_USE_FILE, a CMake source file
7 # that can be included to set the include directories, library directories,
8 # and preprocessor macros. In addition to the variables read from
9 # ITKConfig.cmake, this find module also defines
10 # ITK_DIR - The directory containing ITKConfig.cmake.
11 # This is either the root of the build tree,
12 # or the lib/InsightToolkit directory.
13 # This is the only cache entry.
15 # ITK_FOUND - Whether ITK was found. If this is true,
18 # USE_ITK_FILE - The full path to the UseITK.cmake file.
19 # This is provided for backward
20 # compatability. Use ITK_USE_FILE
23 #=============================================================================
24 # Copyright 2001-2010 Kitware, Inc.
26 # Distributed under the OSI-approved BSD License (the "License");
27 # see accompanying file Copyright.txt for details.
29 # This software is distributed WITHOUT ANY WARRANTY; without even the
30 # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
31 # See the License for more information.
32 #=============================================================================
33 # (To distribute this file outside of CMake, substitute the full
34 # License text for the above reference.)
36 # Use the Config mode of the find_package() command to find ITKConfig.
37 # If this succeeds (possibly because ITK_DIR is already set), the
38 # command will have already loaded ITKConfig.cmake and set ITK_FOUND.
42 set(_ITK_REQUIRED REQUIRED)
48 find_package(ITK ${_ITK_REQUIRED} ${_ITK_QUIET} NO_MODULE
49 NAMES ITK InsightToolkit
50 CONFIGS ITKConfig.cmake
55 # Set USE_ITK_FILE for backward-compatability.
56 set(USE_ITK_FILE ${ITK_USE_FILE})