What target property does TARGET_FILE_DIR access when used in a
generator expression? I'm thinking I might be able to set the output
directory directly to the custom target for each configuration. If I
know which target property to set, this might work. Thanks Brad.

On Mon, May 13, 2013 at 2:01 PM, Brad King <[email protected]> wrote:
> On 05/13/2013 02:48 PM, Robert Dailey wrote:
>> Interesting, I must have overlooked your comment on that issue. Will
>> this also work for add_custom_command using the OUTPUT/DEPENDS/COMMAND
>> arguments? I don't copy using a post build event, I create a custom
>> target instead and attach the custom commands to it. I do it this way
>> so that if the source DLLs change, the custom target will be smart
>> enough to copy changed DLLs.
>
> In the proposed approach the files will copy every time "foo" links,
> and "foo" will re-link whenever the "z" library for the current
> config changes.
>
> In general though it does not hook up the dependencies directly.
> You'll still need to look at adding generator expressions to
> OUTPUT and DEPENDS for that.  Note that to handle different
> names per-config you can do something like
>
>  $<$<CONFIG:Debug>:debug>$<$<NOT:$<CONFIG:Debug>>:release>
>
> -Brad
--

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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Reply via email to