From a1d2bda23e9fb2bc463b3ff5b57f1f88edfd40ca Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Tue, 24 Dec 2013 01:15:42 +0100 Subject: Don't copy find_dependency in configure_package_config_file. There is not really any need to. Downstreams can either rely on it being provided by CMake, or copy and distribute it. Change the documented include for the find_dependency macro. --- Help/manual/cmake-packages.7.rst | 4 ++-- Modules/CMakePackageConfigHelpers.cmake | 11 ++--------- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/Help/manual/cmake-packages.7.rst b/Help/manual/cmake-packages.7.rst index 23a8b68..1ca661e 100644 --- a/Help/manual/cmake-packages.7.rst +++ b/Help/manual/cmake-packages.7.rst @@ -375,7 +375,7 @@ dependencies of a package should be found in the ``Config.cmake`` file: .. code-block:: cmake - include(CMakePackageConfigHelpers) + include(CMakeFindDependencyMacro) find_dependency(Stats 2.6.4) include("${CMAKE_CURRENT_LIST_DIR}/ClimbingStatsTargets.cmake") @@ -392,7 +392,7 @@ be true. This can be tested with logic in the package configuration file: .. code-block:: cmake - include(CMakePackageConfigHelpers) + include(CMakeFindDependencyMacro) find_dependency(Stats 2.6.4) include("${CMAKE_CURRENT_LIST_DIR}/ClimbingStatsTargets.cmake") diff --git a/Modules/CMakePackageConfigHelpers.cmake b/Modules/CMakePackageConfigHelpers.cmake index 2c1c613..f388fe0 100644 --- a/Modules/CMakePackageConfigHelpers.cmake +++ b/Modules/CMakePackageConfigHelpers.cmake @@ -11,8 +11,7 @@ # CONFIGURE_PACKAGE_CONFIG_FILE( INSTALL_DESTINATION # [PATH_VARS ... ] # [NO_SET_AND_CHECK_MACRO] -# [NO_CHECK_REQUIRED_COMPONENTS_MACRO] -# [NO_FIND_DEPENDENCY_MACRO]) +# [NO_CHECK_REQUIRED_COMPONENTS_MACRO]) # # # @@ -196,7 +195,6 @@ include(CMakeParseArguments) include(WriteBasicConfigVersionFile) -include(CMakeFindDependencyMacro) macro(WRITE_BASIC_PACKAGE_VERSION_FILE) write_basic_config_version_file(${ARGN}) @@ -205,7 +203,7 @@ endmacro() set(cfpch_dir ${CMAKE_CURRENT_LIST_DIR}) function(CONFIGURE_PACKAGE_CONFIG_FILE _inputFile _outputFile) - set(options NO_SET_AND_CHECK_MACRO NO_CHECK_REQUIRED_COMPONENTS_MACRO NO_FIND_DEPENDENCY_MACRO) + set(options NO_SET_AND_CHECK_MACRO NO_CHECK_REQUIRED_COMPONENTS_MACRO) set(oneValueArgs INSTALL_DESTINATION ) set(multiValueArgs PATH_VARS ) @@ -291,11 +289,6 @@ endmacro() ") endif() - if(NOT CCF_NO_FIND_DEPENDENCY_MACRO) - file(READ "${cfpch_dir}/CMakeFindDependencyMacro.cmake" find_dependency_macro) - set(PACKAGE_INIT "${PACKAGE_INIT} ${find_dependency_macro}") - endif() - set(PACKAGE_INIT "${PACKAGE_INIT} ####################################################################################") -- cgit v0.12