Skip to content
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] Packages with multiple components #2288

Closed
ytimenkov opened this issue Jan 10, 2018 · 2 comments
Closed

[question] Packages with multiple components #2288

ytimenkov opened this issue Jan 10, 2018 · 2 comments

Comments

@ytimenkov
Copy link
Contributor

As I understand the solution for #14 is implemented only for boost and has tailored for CMake (new FindBoost.cmake is packaged with recipe) so impossible to use in other generators.

Are there any plans/ideas on generalizing this functionality?

I myself can imagine 2 opposite approaches:

  1. Adding components into cpp_info so generators can employ it. Then CMake generator probably needs to produce a module which has support for find_package(COMPONENTS) and export libraries as a packages.

    However it's unclear how to introduce dependencies between components, say boost has "boost" as headers and then "boost_filesystem" just adds library and depends on "boost" to pull in headers.

  2. Every generator on its own.

    In other words allow tighter coupling between package and build system it uses. Then for CMake use nice export() commands to produce relocatable packages, so conan's job is to define <Package>_DIR and find_package(Package CONFIG ...) will pull it in.

    Other pros of this approach:

    1. This specific configuration file may be tailored much better for the particular generator rather than generic one.
    2. For CMake in particular it greatly simplifies developing multiple components at once as developer may override where find_package looks for file to consume dependency directly from local build folder.
@thejohnfreeman
Copy link

See the work on components in #5090 .

@jgsogo
Copy link
Contributor

jgsogo commented Jun 7, 2019

I'm closing this issue, so any further conversation goes to the other issue. 💪

@jgsogo jgsogo closed this as completed Jun 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants