summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2011-04-19 18:08:20 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2011-04-19 18:08:20 (GMT)
commit2b445349508730d4f79478b0e22ea1b48e7bffc0 (patch)
treeef30094ec3dd35c91a89a3c968bef541c0ab407c /Modules
parent4d2d9d44e614a2f6e651d04a4387561e2943eab7 (diff)
parentaa170c20f7353a1781e7886b705908add569f027 (diff)
downloadCMake-2b445349508730d4f79478b0e22ea1b48e7bffc0.zip
CMake-2b445349508730d4f79478b0e22ea1b48e7bffc0.tar.gz
CMake-2b445349508730d4f79478b0e22ea1b48e7bffc0.tar.bz2
Merge topic 'FindITK-passthru'
aa170c2 FindITK: Use passthru find_package config mode for messages
Diffstat (limited to 'Modules')
-rw-r--r--Modules/FindITK.cmake16
1 files changed, 9 insertions, 7 deletions
diff --git a/Modules/FindITK.cmake b/Modules/FindITK.cmake
index 5f43dd9..a3ca998 100644
--- a/Modules/FindITK.cmake
+++ b/Modules/FindITK.cmake
@@ -37,19 +37,21 @@
# If this succeeds (possibly because ITK_DIR is already set), the
# command will have already loaded ITKConfig.cmake and set ITK_FOUND.
IF(NOT ITK_FOUND)
- FIND_PACKAGE(ITK QUIET NO_MODULE
+ 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
NAMES ITK InsightToolkit
CONFIGS ITKConfig.cmake
)
ENDIF()
-SET(ITK_DIR_MESSAGE "Please set ITK_DIR to the directory containing ITKConfig.cmake. This is either the root of the build tree, or PREFIX/lib/InsightToolkit for an installation.")
-
IF(ITK_FOUND)
# Set USE_ITK_FILE for backward-compatability.
SET(USE_ITK_FILE ${ITK_USE_FILE})
-ELSEIF(ITK_FIND_REQUIRED)
- MESSAGE(FATAL_ERROR ${ITK_DIR_MESSAGE})
-ELSEIF(NOT ITK_FIND_QUIETLY)
- MESSAGE(STATUS ${ITK_DIR_MESSAGE})
ENDIF()