[CMake] MSVC7.1 static link question

Philip Lowman philip at yhbt.com
Tue Feb 10 00:10:13 EST 2009


On Mon, Feb 9, 2009 at 12:39 PM, Luigi Calori <l.calori at cineca.it> wrote:

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


Try using the STATIC_LIBRARY_FLAGS option to set_target_properties().

-- 
Philip Lowman
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20090210/92240de1/attachment.htm>


More information about the CMake mailing list