Closed Dimitrius-dev closed 3 months ago
Hi @memsharded
Thanks for your question.
Header-only packages do not have compiled libraries so something like .libs = ["some_part_of_lib1"]
is incorrect and shouldn't be done.
The thing is that components main benefit is avoid overlinking, and header-only do not suffer that, so there is very little benefit specifying components for header-only libraries. I wouldn't recommend it for most cases, and keep it simple.
If you still want to do it, the fields that need to be defined will be self.cpp_info.components["some_part_of_lib1"].includedirs = ["part1_include_dir"]
and probably setting libdirs = []
and bindirs = []
for every component (for being complete and clean)
Thank you so much for help!
That clarifies the issue? Maybe we can close the ticket? You can always open a new one for further questions (you can also use the main Conan client repo in https://github.com/conan-io/conan for general Conan client questions)
Yes, closing
Description: Is there any example of header-only package with components? I tried to compose it myself but it did not work. Tested it with __test_package__. This is head of the lib which only contains other lib parts so it has not any code insertion.
Example i use