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

Brad King brad.king at kitware.com
Mon Sep 17 15:23:35 EDT 2012


On 09/17/2012 03:14 PM, Alexander Neundorf wrote:
> On Monday 17 September 2012, Brad King wrote:
>>> I guess I have to handle the error case better than simply erroring out.
>>
>> Not IMO.  Remember my message here:
> 
> I think this is different.
> Here, in this case, it may fail because the required (missing) package was 
> simply not found, because it is not installed.

I must not understand the use case.  It looks to me like you're generating
a <pkg>Targets.cmake file to be loaded by a <pkg>Config.cmake file.  If
these files are being read then <pkg>_DIR is set to a copy of the <pkg>.
The package has been found.  Just as in the previous discussion, the
error in the package occurs because it is misconfigured: one of its
dependencies is not installed or loaded correctly to provide the other
imported target.

-Brad



More information about the cmake-developers mailing list