<div class="gmail_quote">On Wed, Dec 10, 2008 at 3:33 PM, Hendrik Sattler <span dir="ltr"><<a href="mailto:post@hendrik-sattler.de">post@hendrik-sattler.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Am Wednesday 10 December 2008 22:57:09 schrieb James Bigler:<br>
<div class="Ih2E3d">> I've read the documentation, but it's still not clear to me what the<br>
> difference between these two property is.<br>
><br>
> Could someone please explain it to me?<br>
<br>
</div>Under some circumstances, when linking to a library you also have to link with<br>
all dependent libraries, and sometimes linking to the link-interface<br>
libraries is sufficient.<br>
The one is a subset of the other.<br>
</blockquote></div><br><br>I have a library which depends on libpng. If libpng is shared, then I don't need to know that libpng links agains libz, but if libpng is static, then I better well know that libpng needs libz so that when I need to eventually link against my library I will link against libpng and libz.<br>
<br>So using this example, is the following code correct?<br><br> add_library(mylibrary SHARED IMPORTED)<br><br> set_target_properties(mylibrary PROPERTIES<br> IMPORTED_LOCATION "${mylibrary_location}"<br> IMPORTED_LINK_DEPENDENT_LIBRARIES z<br>
IMPORTED_LINK_INTERFACE_LIBRARIES png<br> )<br><br>Thanks,<br>James<br>