[CMake] CPack: Adding external DLLs to installer package

Philip Lowman philip at yhbt.com
Thu May 15 07:27:17 EDT 2008


On Wed, May 14, 2008 at 4:22 AM, Matthias Riechmann <riechmann at ira.uka.de>
wrote:

> Hi folks,
>
> is there any well defined way to include external DLL files (Qt, VTK, ITK,
> ...) into the installer? I guess it will work somehow using the
> INSTALL(FILES ...) command but currently I have no idea how to find those
> files automatically or how to compose a command like "I want all the files F
> which are located in directory DS to be copied to directory DT". Any idea?


Use file(GLOB ...)?

file(GLOB MY_DLL_FILES ${MY_DIRECTORY}/*.dll)
install(FILES ${MY_DLL_FILES} DESTINATION bin)

Either that or you can list them manually if there are only a few of them
after you call FIND_PACKAGE which is often what we do.  Append them all to a
list and then call install() at the tail end of your CMakeLists.

-- 
Philip Lowman
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20080515/5d4753be/attachment.htm>


More information about the CMake mailing list