ECMPackageConfigHelpersΒΆ

Helper macros for generating CMake package config files.

write_basic_package_version_file() is the same as the one provided by the CMakePackageConfigHelpers module in CMake; see that module’s documentation for more information.

ecm_configure_package_config_file(<input> <output>
    INSTALL_DESTINATION <path>
    [PATH_VARS <var1> [<var2> [...]]
    [NO_SET_AND_CHECK_MACRO]
    [NO_CHECK_REQUIRED_COMPONENTS_MACRO])

This behaves in the same way as configure_package_config_file() from CMake 2.8.12, except that it adds an extra helper macro: find_dependency().

find_dependency(<dep> [<version> [EXACT]])

find_dependency() should be used instead of find_package() to find package dependencies. It forwards the correct parameters for EXACT, QUIET and REQUIRED which were passed to the original find_package() call. It also sets an informative diagnostic message if the dependency could not be found.

Note that there is no argument to disable the find_dependency() macro; if you do not require this macro, you should just use the CMakeFindDependencyMacro module directly.

CMake 3.0.0 will include a CMakeFindDependencyMacro module that will provide the find_dependency() macro (which you can include() in your package config file), so this file is only useful for projects whose minimum required version is 2.8.12.

Since pre-1.0.0.

Previous topic

ECMOptionalAddSubdirectory

Next topic

ECMPoQmTools

This Page