[CMake] Shared Libraries & dependencies

Andreas Pakulat apaku at gmx.de
Thu Dec 11 13:19:52 EST 2008


On 11.12.08 10:55:42, Robert Dailey wrote:
> If I have a project in CMake that builds a shared library, what will happen
> if I set this shared library project as a parameter in
> target_link_libraries() for an executable project? What will happen to the
> DLL file? Will CMake copy it to the executable output directory
> automatically, or must I do this manually through CMake -E?

Inside the builddir? No it won't. If you however use the install() method
together with the RUNTIME, ARCHIVE and LIBRARY options it will install the
.dll into the RUNTIME directory and the import library into the ARCHIVE
directory. So just make sure to provide all three for any install() call
and .exe and .dll will end up in the same directory.

Andreas

-- 
Life is to you a dashing and bold adventure.


More information about the CMake mailing list