[CMake] copy dependant shared libs locally

Petr Kmoch petr.kmoch at gmail.com
Thu May 17 03:43:35 EDT 2012


Hi Daniel.

In general, that is not possible with cmake at the moment. What I
currently do is have two custom targets, one for copying to debug, one
for copying to release. It's annoying that both get run in either
configuration, but I couldn't find a better way around it.

There are some bugreports in cmake's tracker, you might find some
inspiration there:
http://public.kitware.com/Bug/view.php?id=9974
http://public.kitware.com/Bug/view.php?id=12877

Petr

On Thu, May 17, 2012 at 9:12 AM, Daniel Krikun <krikun.daniel at gmail.com> wrote:
> Hello,
>
> I would like to trace shared library dependencies between targets (and also
> to external packages) and then copy required dll's to output bin directory
> (so that they are immediately available, without PATH editing) in the
> post-build.
> However, for debug configuration, I need to copy debug dll's (usually with
> 'd' suffix) and for release configuration - release dll's.
>
> I can copy files to run-time directory using add_custom_command, but how
> could I make a distinction for the release-debug files?
>
> Thanks,
>
> --
> Daniel Krikun
>
>
> --
>
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake


More information about the CMake mailing list