[cmake-developers] Need some pointers on learning the code

Robert Dailey rcdailey.lists at gmail.com
Mon May 13 14:48:46 EDT 2013


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.

On Mon, May 13, 2013 at 1:30 PM, Brad King <brad.king at kitware.com> wrote:
> On 05/13/2013 02:07 PM, Robert Dailey wrote:
>> Actually now that I think about this a littler closer, changing the
>> generator expressions may not work for a specific case I'm blocked on.
>>
>> I store my third party library binaries in a "debug" and "release"
>> directories. I have a custom target that I define to copy the
>> appropriate debug or release DLLs to the appropriate output
>> directories, so that when I debug my applications, they find the
>> appropriate DLLs in the same directory. So the copy mapping should be
>> as follows:
>>
>> debug -> Debug
>> release -> Release
>> release -> RelWithDebInfo
>> release -> MinSizeRel
>>
>> Specifically for the RELEASE case. I can't use $<CONFIGURATION> for
>> the source directory, since the name is "release" between all 3
>> release configurations. This case is easily solved with issue 9974,
>> however. Any thoughts?
>
> This looks like the common use case I explain here:
>
>  http://www.cmake.org/Bug/view.php?id=9974#c29033
>
> You don't need any new features for it.
>
> -Brad



More information about the cmake-developers mailing list