1 ############################################################################## 3 # @brief Find an ITK installation or build tree. 5 # When ITK is found, the ITKConfig.cmake file is sourced to setup the 6 # location and configuration of ITK. Please read this file, or 7 # ITKConfig.cmake.in from the ITK source tree for the full list of 8 # definitions. Of particular interest is ITK_USE_FILE, a CMake source file 9 # that can be included to set the include directories, library directories, 10 # and preprocessor macros. In addition to the variables read from 11 # ITKConfig.cmake, this find module also defines 13 # @par Output variables: 16 # @tp @b ITK_DIR @endtp 17 # <td>The directory containing ITKConfig.cmake. 18 # This is either the root of the build tree, 19 # or the lib/InsightToolkit directory. 20 # This is the only cache entry.</td> 23 # @tp @b ITK_FOUND @endtp 24 # <td>Whether ITK was found. If this is true, @c ITK_DIR is okay.</td> 27 # @tp @b USE_ITK_FILE @endtp 28 # <td>The full path to the <tt>UseITK.cmake</tt> file. 29 # This is provided for backward 30 # compatability. Use @c ITK_USE_FILE instead.</td> 34 # @ingroup CMakeFindModules 35 ############################################################################## 37 # ============================================================================ 38 # Copyright 2000-2009 Kitware, Inc., Insight Software Consortium 39 # All rights reserved. 41 # Distributed under the OSI-approved BSD License (the "License"); 42 # see accompanying file Copyright.txt for details. 44 # This software is distributed WITHOUT ANY WARRANTY; without even the 45 # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 46 # See the License for more information. 47 #============================================================================= 48 # (To distribute this file outside of CMake, substitute the full 49 # License text for the above reference.) 51 # Use the Config mode of the find_package() command to find ITKConfig. 52 # If this succeeds (possibly because ITK_DIR is already set), the 53 # command will have already loaded ITKConfig.cmake and set ITK_FOUND. 57 SET(_ITK_REQUIRED REQUIRED)
63 FIND_PACKAGE(ITK ${ITK_FIND_VERSION} ${_ITK_REQUIRED} ${_ITK_QUIET} NO_MODULE
64 NAMES ITK InsightToolkit
65 CONFIGS ITKConfig.cmake
70 # Set USE_ITK_FILE for backward-compatability. 71 SET(USE_ITK_FILE ${ITK_USE_FILE})