On Wednesday 11 January 2012, Brad King wrote:
...
> > To support the fully flexible version, the developer must calculate the
> > relative path from the configured CONFIG_INSTALL_DIR (where the
> > Config.cmake file goes) to the configured INCLUDE_INSTALL_DIR.
> 
> It's not too hard.  See ITK for example:

Depends on the definition of "too" ;-)
I'll see whether I can come up with some macro or helper file to make it 
easier.

>    http://itk.org/gitweb?p=ITK.git;a=blob;f=CMakeLists.txt;hb=v4.0.0#l558
> 
>  > do you have suggestions how to make the code needed in the
>  > Config.cmake files easier ?
> 
> I've done this for a few projects that allow such destinations to be
> changed. If one destination is a full path then it can just be used as-is.
>  If it is a relative path then I start by computing the installation
> prefix based on the installation depth of the Config.cmake file using
> get_filename_component. Then I add on the other relative destination.

Yes, that's basically what I do here too:
https://projects.kde.org/projects/kde/kdeexamples/repository/revisions/master/show/buildsystem/HowToInstallALibrary

> I don't think the case that the Config.cmake install destination is
> absolute and the others are relative to an installation prefix is
> important.  I see no real-world use case to do things that way.

Thanks for taking your time to read and respond to this :-)
Alex
--

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