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

Implement CMakeDeps configuration to override dependencies information #12367

Closed
memsharded opened this issue Oct 21, 2022 · 2 comments
Closed
Milestone

Comments

@memsharded
Copy link
Member

memsharded commented Oct 21, 2022

From #12357 from @madebr

I think there is a third choice (thanks @jcar87!), that would be much better: if the problem is that we want to allow recipes to patch the behavior of the target names or some other property while generating cmake files, the interface should clearly express that intention, so something like:

def generate(self):
    cmake = CMakeDeps(self)

    cmake.name_alternatives["jansson"] = "Jansson" # overrides the name of the generated files to this
    cmake.target_aliases["jasson::jansson'] = ["Jansson::Jansson"] 

This satisfies all needs:

  • The changes are clearly and naturally local, they only apply to a local object
  • There is no risk of destroying upstream data information

Originally posted by @memsharded in #12357 (comment)

@prince-chrismc
Copy link
Contributor

This would also be amazing to inject variables for older projects conan-io/conan-center-index#13551
HDF5 would really benefit form this feature.

@prince-chrismc
Copy link
Contributor

I think this can be closed with 1.55? #12609

@memsharded memsharded added this to the 1.55 milestone Dec 19, 2022
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

2 participants