[cmake-developers] Setting target properties before the target is defined ?

Brad King brad.king at kitware.com
Mon Feb 18 08:33:32 EST 2013


On 02/17/2013 10:00 AM, Alexander Neundorf wrote:
> On Sunday 17 February 2013, Brad King wrote:
>> Just to make sure I understand correctly, you're bringing up a use case
>> where an imported target's dependencies are not satisfied but it does
>> not matter when the imported target is not used by the project?
> 
> Yes.
> But I wouldn't call it use case, but a case which accidentially works right 

Why not?  Say I'm using a package that provides 50 different libraries
that wrap around various third-party image file format readers.  Each
library depends on a different third-party library for its corresponding
format.  Say my app wants to use this to read JPEG but does not care
about PNG.  Now I need to find PNG just to prevent the warning that
the package's target would need it if I linked to the png reader even
though I do not?

-Brad



More information about the cmake-developers mailing list