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

[feature] Associate CMake target with specific libs #6250

Closed
1 task done
uilianries opened this issue Dec 17, 2019 · 3 comments
Closed
1 task done

[feature] Associate CMake target with specific libs #6250

uilianries opened this issue Dec 17, 2019 · 3 comments

Comments

@uilianries
Copy link
Member

Hi!

Some packages requires multiple targets, because they have more than one library or configuration. For instance: https://github.com/conan-io/conan-center-index/pull/486/files#diff-e5f7472687ce110b2ecd373150bb38c0

As you can see, OpenSSL contains 2 targets, OpenSSL::Crypto and OpenSSL::SSL.

We could manage cpp_info to provide such feature:

def cpp_info(self):
    self.cpp_info.names["cmake"].targets["Crypto"].libs = ["crypto"]
    self.cpp_info.names["cmake"].targets["SSL"].libs = ["ssl"]
    if self.options.shared:
        self.cpp_info.names["cmake"].targets["SSL"].defines = ["SSL_SHARED"]

related issue: #6069

@memsharded
Copy link
Member

Is this a duplicate of the components feature? #5090

It was tried some time ago, there was a PR from @danimtb, but was put on hold because some risks and not a huge priority.

@danimtb
Copy link
Member

danimtb commented Dec 18, 2019

It looks very similar to the proposal in #5090 indeed. @gocarlos @uilianries are we missing something here?

@uilianries
Copy link
Member Author

Indeed, #5090 sounds be the saint graal of cpp_info!

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