[CMake] Package installation conundrum

Alexander Neundorf a.neundorf-work at gmx.net
Tue May 8 15:16:42 EDT 2012


On Tuesday 08 May 2012, Dave Abrahams wrote:
> Here's another one!
> 
> Scenario:
> 
> * I am running CMake under 0install to build and install libraries
> 
> * Each library builds a package SomePackage for the library binaries
>   and another package SomePackage-dev for the library headers (and
>   import libraries on Windows)
> 
> * The FindSomePackage.cmake file is part of the -dev package
> 
> * After building, 0install moves each package's build products into a
>   mostly-unpredictable subdirectory of its otherwise-read-only "cache"
>   (~/.cache/0install.net/).  The subdirectory's name is determined by a
>   hash of the files.
> 
> * To get this working, I followed the scheme discussed here:
>  
> http://news.gmane.org/find-root.php?message_id=%3cm2lil6s8jq.fsf%40pluto.l
> uannocracy.com%3e
> 
>   Summary:
> 
>   1. Create a 0install "SomePackage-preinstall" package.  Building this
>      package involves CMake building and installing both SomePackage and
>      SomePackage-dev into separate subdirectories (main/ and dev/) of
>      some prefix.  0install thereafter moves the whole directory tree
>      into its cache in a directory called sha1=someuglyhash
> 
>   2. SomePackage's 0installation procedure is to copy
> sha1=someuglyhash/main/ into its distribution directory (which then ends
> up in
>      ~/.cache/0install.net/sha1=otheruglyhash)
> 
>   3. SomePackage-dev's 0installation procedure is to copy
>      sha1=someuglyhash/dev/ into its distribution directory
> 
> Problem: FindSomePackageConfig.cmake now has the wrong path to the
> library binaries.
> 
> Any help most appreciated.

Can you please summarize what you actually want to achieve ?

Do you say that libFoo installs a FindFoo.cmake as part of libFoo-devel ?
If that's the case, then this is wrong.
FindFoo.cmake must be part of the using software, not of the software to be 
searched.

Why do you have to find the installed library in this cache directory ?

Alex

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20120508/e0aac5f8/attachment.htm>


More information about the CMake mailing list