Skip to content

New CMakeDeps issues #17321

@memsharded

Description

@memsharded

Hi @memsharded, I've tried the new CMakeDeps generator, and ran into some problems:

  • Packages that use cmake_find_mode=none with a fooConfig.cmake file in the cpp_info.builddirs path (https://docs.conan.io/2/reference/tools/cmake/cmakedeps.html#disable-cmakedeps-for-installed-cmake-configuration-files) are no longer discovered. This path will need to be added to CMAKE_FIND_ROOT_PATH by conan_cmakedeps_paths.cmake. Adding them to CMAKE_PREFIX_PATH alone would not be sufficient in the case of cross-compilation, unless the ~/.conan2/p/b/fooabc/p is already in the CMAKE_FIND_ROOT_PATH.
  • There appears to be something wrong with the capitalization of the generated CMake targets. For example, when building a package foo that depends on OpenBLAS, the generated target foo::foo by Conan depends on openblas::openblas, whereas the actual generated OpenBLAS target is OpenBLAS::OpenBLAS.

If useful, I could open new issues with more information.

Originally posted by @tttapa in #16324 (comment)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions