[CMake] Multiple output directories

Michael Hertling mhertling at online.de
Tue Jun 28 06:36:11 EDT 2011


On 06/28/2011 10:40 AM, pellegrini wrote:
> Hello everybody,
> 
> I would like to know if there is a cmake command to place my generated 
> executable in several directories in one shot.
> 
> Using SET(EXECUTABLE_OUTPUT_PATH    my_path1) will allow to customize 
> the place where my executable should be placed
> but only in a single directory I guess.
> 
> Any idea ?
> 
> thanks a lot
> 
> Eric

You might use several

ADD_CUSTOM_COMMAND(TARGET myexe POST_BUILD
    COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:myexe> mypath)

commands for this purpose.

'hope that helps.

Regards,

Michael


More information about the CMake mailing list