On Thursday 17 May 2012, Daniel Krikun 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?

So you want to be able to run your executables directly from the buildtree, 
right ?

To solve the problem for dlls which are built in your project, you can adjust 
the directories where cmake creates executables and shared libs, so that they 
are created in the same directory and the dlls will be found:

set(RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin" )

This should put both exes and dlls into one common directory.

Alex
--

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

Reply via email to