summaryrefslogtreecommitdiffstats
path: root/Modules/FindPackageHandleStandardArgs.cmake
diff options
context:
space:
mode:
authorAlex Neundorf <neundorf@kde.org>2012-09-19 19:50:55 (GMT)
committerBrad King <brad.king@kitware.com>2012-09-28 13:21:36 (GMT)
commitae4ab62569e9b68d6976cb6ad4c1ad411ed8d3da (patch)
tree69711064b311c88731288d0f556a4bb15813ae86 /Modules/FindPackageHandleStandardArgs.cmake
parent6508a8c804264304ee9db4e9239857fa1c663989 (diff)
downloadCMake-ae4ab62569e9b68d6976cb6ad4c1ad411ed8d3da.zip
CMake-ae4ab62569e9b68d6976cb6ad4c1ad411ed8d3da.tar.gz
CMake-ae4ab62569e9b68d6976cb6ad4c1ad411ed8d3da.tar.bz2
find_package: add support for a <package>_NOT_FOUND_MESSAGE variable
If a config-file sets <package>_FOUND to FALSE, it can now give a reason using the variable <package>_NOT_FOUND_MESSAGE, which is used by cmFindPackage and FPHSA. Alex
Diffstat (limited to 'Modules/FindPackageHandleStandardArgs.cmake')
-rw-r--r--Modules/FindPackageHandleStandardArgs.cmake3
1 files changed, 3 insertions, 0 deletions
diff --git a/Modules/FindPackageHandleStandardArgs.cmake b/Modules/FindPackageHandleStandardArgs.cmake
index 888e109..25d8df3 100644
--- a/Modules/FindPackageHandleStandardArgs.cmake
+++ b/Modules/FindPackageHandleStandardArgs.cmake
@@ -120,6 +120,9 @@ macro(_FPHSA_HANDLE_FAILURE_CONFIG_MODE)
list(GET ${_NAME}_CONSIDERED_VERSIONS ${currentConfigIndex} version)
set(configsText "${configsText} ${filename} (version ${version})\n")
endforeach()
+ if (${_NAME}_NOT_FOUND_MESSAGE)
+ set(configsText "${configsText} Reason given by package: ${${_NAME}_NOT_FOUND_MESSAGE}\n")
+ endif()
_FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE} ${VERSION_MSG}, checked the following files:\n${configsText}")
else()