[CMake] executable output path vs executable runtime path

Philip Lowman philip at yhbt.com
Wed Sep 24 08:25:33 EDT 2008


On Wed, Sep 24, 2008 at 3:17 AM, Mehdi Rabah <mehdi.rabah at gmail.com> wrote:

> Hi,
> I'm trying to copy files in the executable *output* directory but I don't
> know how to do it in the way that works in Eclipse CDT and Visual Studio. I
> set my variable executable_output_path (which was changed to
> cmake_runtime_output_path?) to $cmake_binary_dir/bin, and it works in
> Eclipse, but not in Visual studio because the runtime output path in visual
> is more like bin/Debug or bin/Release.
>
>
> How to do it ? (copy ressources files in the executable output path in a
> way that works for all ide?)
>

When I need to copy extra stuff into the runtime output path under Windows
for VS I iterate over ${CMAKE_CONFIGURATION_TYPES} when copying into
${CMAKE_RUNTIME_OUTPUT_PATH}.  If you need Eclipse support you can just copy
into ${CMAKE_RUNTIME_OUTPUT_PATH}.  To vary between the two you can probably
use IF(MSVC).

As for how to do the copying easily, you might find this macro helpful:
http://www.cmake.org/Wiki/CMakeCopyIfDifferent


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


More information about the CMake mailing list