-
Notifications
You must be signed in to change notification settings - Fork 976
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[question] How to use conan components with cmake? #7476
Comments
Hi @kajdam ! Yes, you are correct, If you check Conan Center Index, it's a common approach. For instance: https://github.com/conan-io/conan-center-index/blob/master/recipes/openssl/1.x.x/conanfile.py#L714 |
@uilianries Thanks for clarifying that I did not quite get the part about plain For example if I were to use an
followed by
in my Why use of
with
in It would be just a matter of changing implementation of plain |
No. When you use ONLY Please, read the issue conan-io/conan-center-index#787 which contains more details about. |
Thanks @uilianries |
If a consumer package is using cmake build system, then cmake_find_package and cmake_find_package_multi are the only supported generators to take advantage of dependencies' components.
If a consumer package is using cmake build system, then cmake_find_package and cmake_find_package_multi are the only supported generators to take advantage of dependencies' components.
This ticket is about legacy (removed in 2.0) generators like |
I have tried to use conan components with
cmake
generator, butconanbuildinfo.cmake
did not contain any targets or references pointing to components.After browsing conan's source code I came into conclusion that
cmake_find_package
genrator has to be used to make components work.Is it correct and expected behaviour? Are there any plans to expand component functionality for a plain
cmake
generator?I apprciate it is an experimental feature, but I was not able to find anything in documentation that would suggest only speific generators are supported.
For a specific example and a bit more context on my use case, please refer to my other question #7475
The text was updated successfully, but these errors were encountered: