diff options
author | Alex Neundorf <neundorf@kde.org> | 2012-09-19 19:50:55 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2012-09-28 13:21:36 (GMT) |
commit | ae4ab62569e9b68d6976cb6ad4c1ad411ed8d3da (patch) | |
tree | 69711064b311c88731288d0f556a4bb15813ae86 /Modules/FindPackageHandleStandardArgs.cmake | |
parent | 6508a8c804264304ee9db4e9239857fa1c663989 (diff) | |
download | CMake-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.cmake | 3 |
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() |