<div class="gmail_quote">On Mon, Feb 9, 2009 at 12:39 PM, Luigi Calori <span dir="ltr">&lt;<a href="mailto:l.calori@cineca.it" target="_blank">l.calori@cineca.it</a>&gt;</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;">

I&#39; m quite a newbie in static linking, I would like to combine two lib<br>
into one:<br>
say libtiff needs libjpeg and zlib<br>
If you generate them separately, then when you build an executable that<br>
needs libtiff, you have to link also libjpeg and zlib otherwise unref<br>
happens<br>
It is possible, under VisualStudio interface, to specify libjpeg.lib and<br>
zlib.lib as Additional Dependencies<br>
This way (even if the linker show warnings as duplicate symbols) I<br>
obtain a libtiff that can be used alone.<br>
My question is: can I obtain the same result with cmake?<br>
I&#39; ve tried to use TARGET_LINK_LIBRARIES, that is perfecly working for<br>
exe and SHARED linkage but no success: the<br>
vs project has always the Additional Dependencies field empty.<br>
<br>
Am I completely missing something?</blockquote><div><br>Try using the STATIC_LIBRARY_FLAGS option to set_target_properties().<br><br></div></div>-- <br>Philip Lowman<br>