On 01/20/2016 11:57 AM, rle...@codelibre.net wrote:
> As an aside, I've found some limitations in the usability and utility of
> EXPORT.  These are two of the missing pieces for making the exported
> configuration functional:
> 
> 1) is the need to manually call find_dependency for each of the interface
> libraries being exported.  I work around this with wrapper scripts, for
> example:
> 
>   
> https://github.com/openmicroscopy/bioformats/blob/develop/cpp/lib/ome/bioformats/OMEBioFormatsConfig.cmake
> 
> Here we find our dependencies, then include the generated configuration. 
> The thing is, this is a duplication of our requirements from when we
> called find_package for each of those dependencies.  If cmake could store
> a mapping from imported name to the FindXXX file which created it, this
> could also be automatically embedded in the exported file; it could even
> include the minimum version we need.  And it also means the dependencies
> can never become inconsistent as we change them.

The difficulty of this problem is why we defer responsibility to project
code to provide the imported targets for dependencies of exported targets.
There are so many ways of making imported targets available I don't think
it can be solved in general, but perhaps it can be made to work in common
cases (at least optionally) with some kind of mapping as you propose.

> 2) the need to create the interface library target.

I don't understand what you're saying here.  What interface library target
needs to be created in what context?  Please provide an example.

Thanks,
-Brad

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Reply via email to