[CMake] How to deal with pre built 3rd party libs?

John Drescher drescherjm at gmail.com
Tue May 15 17:18:09 EDT 2012


> I have a project that depends on 3rd party dll's (libxml2).
>
> Is there a 'best practice' to deal with associated files, .h, .lib .dll of
> such within a CMake project?
>
> My library needs to link to the 3rd party lib, and needs its dll for
> execution (obviously), so I feel the need for copying this DLL to my libs
> 'install/bin' folder, so that any of my executables can run, without getting
> a '...dll not found'.
>
>

I wrote cmake macros to generate a batch file containing cmake -e
commands to copy the dlls to each configuration. This I run as a
target in my projects.

John


More information about the CMake mailing list