Re: [CMake] How to installing cmake Config.cmake files under Debian multiarch ?

2011-08-03 Thread Brad King

On 8/3/2011 11:41 AM, Alexander Neundorf wrote:

On Tuesday 02 August 2011, Hendrik Sattler wrote:

If you use cmake 2.8.5, you can use GNUInstalldirs.cmake and let the user
specify the multiarch directory to install in (or solve it once in that
cmake module).


You mean having the user adjust the lib install dir correctly manually ?
Hmm, I think it is not realistic to expect that users will know about that.
There must be a way to do this so that it is works automatically, at least so
that a cmake on the same system will find what was installed.


See discussion here on why we can't transform the install() DESTINATION
options magically:

  http://www.cmake.org/Bug/view.php?id=11964#c25884

The conclusion was that user code that intends to support such cases
must reference a variable in its install destinations.  The
GNUInstallDirs module provides a good variable to reference:

  
http://cmake.org/gitweb?p=cmake.git;a=blob;f=Modules/GNUInstallDirs.cmake;hb=v2.8.5#l71

  install(... DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/Foo)

However, as noted in the comments it still needs to be taught about
multiarch.  Even though that it doesn't do it in CMake 2.8.5 the variable
is a cache entry so packagers can fix it at build time.

The find_package command in CMake 2.8.5 is multiarch-aware and will
search the right place under each installation prefix.

-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://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] How to installing cmake Config.cmake files under Debian multiarch ?

2011-08-02 Thread Hendrik Sattler
Am Dienstag, 2. August 2011, 21:55:16 schrieb Alexander Neundorf:
 Hi,
 
 until recently, I recommended to install Config.cmake files more or less
 like this:
 
 install(FILES FooConfig.cmake DESTINATION lib${LIB_SUFFIX}/cmake/Foo )
 
 with LIB_SUFFIX being 64 on systems where this is required.
 
 How do I do this on a Debian multiarch system ?
 How do I know in which directory I should install ?

If you use cmake 2.8.5, you can use GNUInstalldirs.cmake and let the user 
specify the multiarch directory to install in (or solve it once in that cmake 
module).
At least that was I am going to do for openobex.

HS
___
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://www.cmake.org/mailman/listinfo/cmake