diff options
Diffstat (limited to 'Source/cmFindPackageCommand.cxx')
-rw-r--r-- | Source/cmFindPackageCommand.cxx | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx index 470ceca..6e78bd7 100644 --- a/Source/cmFindPackageCommand.cxx +++ b/Source/cmFindPackageCommand.cxx @@ -376,6 +376,26 @@ void cmFindPackageCommand::GenerateDocumentation() "The package configuration file may set <package>_FOUND to false " "to tell find_package that component requirements are not satisfied." "\n" + "A package configuration file may include() a <package>Targets.cmake " + "file, created by install(EXPORT) in the upstream source, to import " + "targets into the downstream consumer. " + "When a new version of the upstream adds INTERFACE properties not " + "present in a previous version it can change behavior for existing " + "downstreams. " + "In order to remain source compatible the upstream package configuration " + "file may set <package>_NO_INTERFACES to disable INTERFACE properties. " + "For example, code of the form:\n" + " if(<package>_FIND_VERSION VERSION_LESS <new-version>\n" + " AND NOT <package>_INTERFACES)\n" + " set(<package>_NO_INTERFACES 1)\n" + " endif()\n" + " include(\"${CMAKE_CURRENT_LIST_DIR}/<package>Targets.cmake\")\n" + "tells <package>Targets.cmake not to provide the INTERFACE properties " + "unless the downstream requests at least <new-version> or sets " + "<package>_INTERFACES to explicitly request them. " + "This allows consumers to decide when to enable the new interfaces when " + "upgrading." + "\n" "See the cmake_policy() command documentation for discussion of the " "NO_POLICY_SCOPE option." ; |