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.
This commit is contained in:
parent
f4f6529354
commit
a1d2bda23e
|
@ -375,7 +375,7 @@ dependencies of a package should be found in the ``Config.cmake`` file:
|
||||||
|
|
||||||
.. code-block:: cmake
|
.. code-block:: cmake
|
||||||
|
|
||||||
include(CMakePackageConfigHelpers)
|
include(CMakeFindDependencyMacro)
|
||||||
find_dependency(Stats 2.6.4)
|
find_dependency(Stats 2.6.4)
|
||||||
|
|
||||||
include("${CMAKE_CURRENT_LIST_DIR}/ClimbingStatsTargets.cmake")
|
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
|
.. code-block:: cmake
|
||||||
|
|
||||||
include(CMakePackageConfigHelpers)
|
include(CMakeFindDependencyMacro)
|
||||||
find_dependency(Stats 2.6.4)
|
find_dependency(Stats 2.6.4)
|
||||||
|
|
||||||
include("${CMAKE_CURRENT_LIST_DIR}/ClimbingStatsTargets.cmake")
|
include("${CMAKE_CURRENT_LIST_DIR}/ClimbingStatsTargets.cmake")
|
||||||
|
|
|
@ -11,8 +11,7 @@
|
||||||
# CONFIGURE_PACKAGE_CONFIG_FILE(<input> <output> INSTALL_DESTINATION <path>
|
# CONFIGURE_PACKAGE_CONFIG_FILE(<input> <output> INSTALL_DESTINATION <path>
|
||||||
# [PATH_VARS <var1> <var2> ... <varN>]
|
# [PATH_VARS <var1> <var2> ... <varN>]
|
||||||
# [NO_SET_AND_CHECK_MACRO]
|
# [NO_SET_AND_CHECK_MACRO]
|
||||||
# [NO_CHECK_REQUIRED_COMPONENTS_MACRO]
|
# [NO_CHECK_REQUIRED_COMPONENTS_MACRO])
|
||||||
# [NO_FIND_DEPENDENCY_MACRO])
|
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
@ -196,7 +195,6 @@
|
||||||
include(CMakeParseArguments)
|
include(CMakeParseArguments)
|
||||||
|
|
||||||
include(WriteBasicConfigVersionFile)
|
include(WriteBasicConfigVersionFile)
|
||||||
include(CMakeFindDependencyMacro)
|
|
||||||
|
|
||||||
macro(WRITE_BASIC_PACKAGE_VERSION_FILE)
|
macro(WRITE_BASIC_PACKAGE_VERSION_FILE)
|
||||||
write_basic_config_version_file(${ARGN})
|
write_basic_config_version_file(${ARGN})
|
||||||
|
@ -205,7 +203,7 @@ endmacro()
|
||||||
set(cfpch_dir ${CMAKE_CURRENT_LIST_DIR})
|
set(cfpch_dir ${CMAKE_CURRENT_LIST_DIR})
|
||||||
|
|
||||||
function(CONFIGURE_PACKAGE_CONFIG_FILE _inputFile _outputFile)
|
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(oneValueArgs INSTALL_DESTINATION )
|
||||||
set(multiValueArgs PATH_VARS )
|
set(multiValueArgs PATH_VARS )
|
||||||
|
|
||||||
|
@ -291,11 +289,6 @@ endmacro()
|
||||||
")
|
")
|
||||||
endif()
|
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}
|
set(PACKAGE_INIT "${PACKAGE_INIT}
|
||||||
####################################################################################")
|
####################################################################################")
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue