79234913

Date: 2024-11-28 17:57:05
Score: 2.5
Natty:
Report link

After some research and conversation under conan's github thread I've came up to the conclusion that it's not a Conan's or CMake's thing, but just the way static/interface libraries are linked.

My iface and myLib libraries where "linked" against other static libraries, but there isn't something like linking a static library against other static library. There is still a lot of things in this matter I need to aknowledge, but as far as I understand they are all linked against the first shared library or executable in the hierarchical tree. Compiling a static library does not call the linking phase, so target_link_libraries against such would cause only including public headers.

It looks like there is no way to treat CMake/Conan components of one project as completely distinct in the means of static dependencies. Every requirement from the Conan dependencies' recipe will take part somewhere in the linking phase.

I would be grateful if someone confirmed this. Otherwise, if put me right, I would check theirs answer.

Reasons:
  • Blacklisted phrase (0.5): I need
  • RegEx Blacklisted phrase (2): I would be grateful
  • Long answer (-1):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: archetypiarz