[CMake] get the target name in add_custom_command

Brandon Van Every bvanevery at gmail.com
Wed Oct 10 10:52:40 EDT 2007


On 10/9/07, Juan Sanchez <Juan.Sanchez at amd.com> wrote:
> In this example, the target name foo has a different OUTPUT_NAME.  How
> do I tell ADD_CUSTOM_COMMAND to use the real name of the target when I
> try to use the copy command within?

GET_TARGET_PROPERTY.  Set a variable outside the ADD_CUSTOM_COMMAND,
then use it.

Cheers,
Brandon Van Every


More information about the CMake mailing list