cmake_find_package_multi and version information
See original GitHub issueTo help us debug your issue please explain:
- I’ve read the CONTRIBUTING guide.
- I’ve specified the Conan version, operating system version and any tool that can be relevant.
- I’ve explained the steps to reproduce the error or the motivation/use case of the question/suggestion.
I was writing a Conan recipe for ITK 5 which uses Eigen3 and requires it through the following CMake line (see the corresponding issue for more background information):
find_package(Eigen3 REQUIRED CONFIG)
Long story short, after having bypassed a recipe-specific issue, I managed to get CMake to find the right CMake config file generated with the Conan generator cmake_find_package_multi
, but the configuration step eventually failed with the following error:
CMake Error at source_subfolder/Modules/ThirdParty/Eigen3/CMakeLists.txt:56 (find_package):
Could not find a configuration file for package "Eigen3" that is compatible
with requested version "3.3".
The following configuration files were considered but not accepted:
~/.conan/data/itk/5.0.1/myteam/stable/build/a9e815bf664154117de467f08af021beb20b7cc4/Eigen3Config.cmake, version: unknown
The recipe I used was that for Eigen 3.3.7, so Conan has the version information, but it seems that this information wasn’t propagated to the files generated by cmake_find_package_multi
, triggering the error above.
Would it be possible to forward the version information to the files generated by this generator so that examples like the one above work?
Conan version: 1.19.1 CMake version: 3.10.2
Issue Analytics
- State:
- Created 4 years ago
- Comments:13 (13 by maintainers)
@lasote yes, sure
No, we have a new
cppinfo.name
but it changes both scope and name:Eigen3XXX::Eigen3XXX
at the same time… We tried to create the concept ofcomponents
in thecppinfo
but it is a blocked feature for several different reasons: https://github.com/conan-io/conan/issues/5090