On 09/24/2013 05:40 AM, Stephen Kelly wrote:
> Because foo contains
> 
>  IMPORTED_LINK_DEPENDENT_LIBRARIES "bar"
> 
> the 'bar' target is part of the missing target check code in 
> cmExportFileGenerator::GenerateMissingTargetsCheckCode.
> 
> If bar was part of the same export set as foo, or if bar was an imported 
> target, that would not be the case. However, then the correct -rpath-link 
> entry may not be created for 'bar'. This has previously been considered a 
> minor issue. Downstream can add a find_package for bar if it is in an 
> unusual location.
[snip]
> My preference is the latter. The patch is quite simple:
> 
>   "IMPORTED_LINK_DEPENDENT_LIBRARIES",
> - iface->SharedDeps, properties, missingTargets);
> + iface->SharedDeps, properties, dummy);

That looks fine to me.  If the dependent libraries are imported then
CMake can generate correct -rpath-link flags, but if not the link can
work without the flags in common use cases anyway.  Also it restores
the behavior before GenerateMissingTargetsCheckCode in this case IIUC.

-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