On Mon, Jun 9, 2008 at 8:48 PM, Alexander Neundorf
<[EMAIL PROTECTED]> wrote:
> Which behaviour do you expect here ?
> Not everything from slib will be included in dlib1.

Hi Alexander,
assuming you mean dlib2 (dlib1 lists slib in its
target_link_libraries, so it should get a copy of slib included). Let
me clarify:

Say I have one DLL (foo) which when built links together a static
library (bar) and some object files to form the DLL. Its interface is
DLL exported to some import library. To use the DLL, one must link
with that import library.

Now I introduce another DLL (baz) which uses the DLL foo, and
therefore lists it in its target_link_libraries() list.

In the default CMake behavior (2.6.0) the baz DLL is linked statically
to the static library bar as well. This can be harmless but in
practice it always costs something if nothing else than plain linking
time if the static library is several MB large.

I would expected that listing a DLL target in a target_link_libraries
would link with the import library of that DLL only, and nothing else,
since nothing else is needed to use that DLL.

Does this make sense? In essence I was surprised that the
INTERFACE-list wasn't set up to be only the import library.

Thanks,
Andreas
_______________________________________________
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to