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

cpp_info should contain relative path to individual libraries #3931

Closed
memsharded opened this issue Nov 12, 2018 · 2 comments
Closed

cpp_info should contain relative path to individual libraries #3931

memsharded opened this issue Nov 12, 2018 · 2 comments

Comments

@memsharded
Copy link
Member

Right now, lib_paths and libs are quite decoupled. It should be more deterministic to express which library belongs to which path. This would also be aligned with @vector-of-bool libman proposal at https://github.com/vector-of-bool/libman

@vector-of-bool
Copy link
Contributor

This kind of boils down to an impedance mismatch between the way Conan (and many tools) represent libraries versus how libman wants to consume them. A library has:

  1. A name
  2. One or more #include directories
  3. One or more "linkables" (library files, as specified by this issue)
  4. Public usage dependencies
  5. Private link-time dependencies

When a package provides a single "library," Conan's representation is fairly sufficient with a few tweaks, given that the CppInfo object has includes, libs, and lib_paths. For packages which expose multiple linkables and/or multiple #include trees, the communication begins to break down.

In my repository, I'm working on a LibMan generator which looks into the UserInfo for a dependency in order to generate the metadata needed for the build system (otherwise tried to auto-generate it from CppInfo). It may be useful to experiment on a UserInfo solution might look like before moving it to the CppInfo object?

@memsharded
Copy link
Member Author

This is being addressed by recent CPS work, adding location fields to cpp_info, latest Conan 2.8 contains this cpp_info.location field.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants