<div dir="ltr">I have a question concerning the transitive linking of dependence and static libs.<div><div><br></div><div>I'm working a on prokect where some shared lib are linked to static lib (do not ask me why).</div><div>So I do:</div><div><br></div><div>set(CMAKE_POSITION_INDEPENDENT_CODE True)<br></div><div><br></div><div>then I have a bunch of libraries (either static or shared) which depends on each other.</div><div>I use PRIVATE and PUBLIC specification with target_link_librairies.</div><div><br></div><div>Now I expected that the transitive link properties would be fullfilled simply i.e. that</div><div>when some target LIB1 is PRIVATEly link against say pthread. Then if a another</div><div>lib LIB2 is linked against LIB1 then then "pthread" wouldn't be dragged into the link</div><div>interface of LIB2.</div><div><br></div><div>It seems that this is not as simple as I thought and as soon as LIB1 is static</div><div>then LIB2 gets the dependency (be it PRIVATE or PUBLIC)...</div><div><br></div><div>Find attached a small example.</div><div><br></div><div>Is this a bug, a feature or something I didn't catch?</div><div><br></div><div> </div>-- <br><div class="gmail-m_-6646876370203668695gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Eric<br></div></div></div></div></div>
</div></div>