[cmake-developers] Exporting dependent library targets in multiple export sets

Brad King brad.king at kitware.com
Mon Sep 17 16:08:49 EDT 2012


On 09/17/2012 03:52 PM, Alexander Neundorf wrote:
> On Monday 17 September 2012, Brad King wrote:
>> What would you do instead of aborting?  Silently pretend the package
>> Bar was not found at the current Bar_DIR and move on with the search?
>> That would require the sandboxing I previously elaborated.  It would
>> also be confusing to users IMO because the package they know is in
>> their search path would be skipped for a mysterious reason.
> 
> Isn't e.g. FindPNG.cmake doing just the same ?
> If zlib wasn't found, fail at finding png.

Okay, so then BarConfig.cmake would set Bar_FOUND to false to pretend
the package isn't found but not change Bar_DIR?

> Instead of simply stating that a required target does not exist, it could also 
> state from which installed export this is expected to come, e.g. 
> FooTargets.cmake.

That would be useful if the namespace doesn't match.

-Brad



More information about the cmake-developers mailing list