[CMake] Copy target from different configurations

Daniel Tavares daniel.tavares at slipg8.com
Thu May 28 19:02:35 EDT 2009


How can I get the location of the target being built? Granted, this file
name changes depending on the configuration that you're building.

 

I'm trying to add a post build event using add_custom_command that will
copy the target executable to a different directory, but I can't get the
correct location of the executable created at build time, because it
changes depending on the configuration being built.

 

add_custom_command will replace the executable target (created by
ADD_EXECUTABLE) with the location of the executable created at build
time, but only if the target is the one being executed by the command.

 



More information about the CMake mailing list