This is an experimental feature subject to breaking changes in future releases.

This is the reference page for cmake_find_package_multi generator. Go to Integrations/CMake if you want to learn how to integrate your project or recipes with CMake.

Generated files

For each conan package in your graph, it will generate 2 files and 1 more per different build_type. Being {name} the package name:

{name}Config.cmake It includes the {name}Targets.cmake and call find_dependency for each dep
{name}Targets.cmake It includes the following files
{name}Targets-debug.cmake Specific information for the Debug configuration
{name}Targets-release.cmake Specific information for the Release configuration
{name}Targets-relwithdebinfo.cmake Specific information for the RelWithDebInfo configuration
{name}Targets-minsizerel.cmake Specific information for the MinSizeRel configuration


A target named {name}::{name} target is generated with the following properties adjusted:

  • INTERFACE_INCLUDE_DIRECTORIES: Containing all the include directories of the package.
  • INTERFACE_LINK_LIBRARIES: Library paths to link.
  • INTERFACE_COMPILE_DEFINITIONS: Definitions of the library.

The targets contains multi-configuration properties, for example, the compile options property is declared like this:

set_property(TARGET {name}::{name}

The targets are also transitive. So, if your project depends on a packages A and B, and at the same time A depends on C, the A target will contain automatically the properties of the C dependency, so in your CMakeLists.txt file you only need to find_package(A CONFIG) and find_package(B CONFIG).


Add the CONFIG option to find_package so that module mode is explicitly skipped by CMake. This helps to solve issues when there is for example a FindXXXX.cmake file in CMake’s default modules directory that could be loaded instead of the XXXXConfig.cmake generated by Conan.

You also need to adjust CMAKE_PREFIX_PATH and CMAKE_MODULE_PATH so CMake can locate all the {name}Config.cmake files: The CMAKE_PREFIX_PATH is used by the find_package and the CMAKE_MODULE_PATH is used by the find_dependency calls that locates the transitive dependencies.