summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2012-10-01 18:05:35 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2012-10-01 18:05:35 (GMT)
commit49c7b649f958d34e06023a85af705122124328f5 (patch)
treeda779fbe7ff05fd344c241fb4f863cbc27f6efce /Modules
parent7dce31f3d03e2202ad54d8b6eb8ab00bce8bbe00 (diff)
parent80112da54e1aa8e64f73a2a5a6a4f73431ac6764 (diff)
downloadCMake-49c7b649f958d34e06023a85af705122124328f5.zip
CMake-49c7b649f958d34e06023a85af705122124328f5.tar.gz
CMake-49c7b649f958d34e06023a85af705122124328f5.tar.bz2
Merge topic 'export-sets'
80112da Merge topic 'AutomocUseTargetProperties' into export-sets 955b966 exports: add a test for exporting dependent targets 6f50a04 exports: define a CMAKE_FIND_PACKAGE_NAME var set by find_package() 0cfd055 exports: move the handling of missing targets into subclasses 190f2c8 exports: fix build with MSVC6 8b5f448 exports: first try at error handling if a target is missing 87f4c01 exports: accept a missing target if it is exported exactly once 999061a exports: store pointers to all installations of each export set 64b3a6c exports: cmGlobalGenerator::ExportSets destructor will clear it 81cdab5 exports: Hold an ExportSet pointer in cm*Export*Generator 5c898fb exports: Add cmExportSetMap class d13ec1a exports: Create class cmExportSet 4e2347c exports: Rename cmGlobalGenerator::AddTargetToExport{s,} e846e70 exports: Remove cmTargetExport constructor 81c66c8 exports: Move cmTargetExport to a dedicated header file ae4ab62 find_package: add support for a <package>_NOT_FOUND_MESSAGE variable ...
Diffstat (limited to 'Modules')
-rw-r--r--Modules/FindPackageHandleStandardArgs.cmake3
-rw-r--r--Modules/readme.txt5
2 files changed, 7 insertions, 1 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()
diff --git a/Modules/readme.txt b/Modules/readme.txt
index 7d61d8d..4818031 100644
--- a/Modules/readme.txt
+++ b/Modules/readme.txt
@@ -18,6 +18,9 @@ XXX_VERSION_YY Expect Version YY if true. Make sure at most one of thes
XXX_WRAP_YY If False, do not try to use the relevent CMake wrapping command.
XXX_YY_FOUND If False, optional YY part of XXX sytem is not available.
XXX_FOUND Set to false, or undefined, if we haven't found, or don't want to use XXX.
+XXX_NOT_FOUND_MESSAGE Should be set by config-files in the case that it has set XXX_FOUND to FALSE.
+ The contained message will be printed by the find_package() command and by
+ find_package_handle_standard_args() to inform the user about the problem.
XXX_RUNTIME_LIBRARY_DIRS Optionally, the runtime library search path for use when running an executable linked to shared libraries.
The list should be used by user code to create the PATH on windows or LD_LIBRARY_PATH on unix.
This should not be a cache entry.
@@ -124,7 +127,7 @@ If neither the QUIET nor REQUIRED options are given then the
FindXXX.cmake module should look for the package and complain without
error if the module is not found.
-A package can be provide sub-components.
+A package can provide sub-components.
Those components can be listed after the COMPONENTS (or REQUIRED)
or OPTIONAL_COMPONENTS keywords. The set of all listed components will be
specified in a XXX_FIND_COMPONENTS variable.