[CMake] Linking external static libraries into dlls
Christoph Höger
choeger at cs.tu-berlin.de
Fri Mar 5 06:46:00 EST 2010
Am Donnerstag, den 04.03.2010, 10:49 -0800 schrieb Tyler Roscoe:
> On Thu, Mar 04, 2010 at 06:30:02PM +0100, Christoph Höger wrote:
> > I am currently trying to link a DLL with the netcdf_c++ static library
> > in the hope I will not have to redistribute netcdf itself. (I thought
> > the DLL could contain the needed code itself).
>
> This should work. Be careful, though. I think symbols from the static
> lib will only show up in your DLL if code in your DLL uses those symbols
> -- that is, not all symbols from the static lib are automatically
> imported into your DLL. This is all IIRC.
That would be fine, the only intention is to redistribute this DLL
without the static library attached.
> > target_library_add({${myLib} ${netcdf_c++.lib})
>
> This is not a CMake command and google has never heard of it. If this is
> a macro in your CMake system, we'll need to see its contents before we
> can comment on it.
Ups, sorry, I meant target_link_libraries it was getting a little late
yesterday.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Dies ist ein digital signierter Nachrichtenteil
URL: <http://www.cmake.org/pipermail/cmake/attachments/20100305/edeef554/attachment.pgp>
More information about the CMake
mailing list