[CMake] Packaging Best Practices for Linux

Michael Jackson mike.jackson at bluequartz.net
Wed May 16 14:19:50 EDT 2012


On May 16, 2012, at 1:50 PM, Andreas Pakulat wrote:

> Hi,
> 
> Am Mittwoch, 16. Mai 2012 schrieb Michael Jackson :
>  We have a small open-source project (http://dream3d.bluequartz.net) where we are currently releasing binaries for Windows and OS X but not for Linux due to our lack of knowledge on how to properly release them. Our project depends on the following projects:
>  Qt 4.7 (I think it will run with 4.6)
>  Qwt 5.x
>  Boost (About any version will work)
>  HDF5 v1.8.x
> 
>  I would like to release linux binaries but I am not really sure what cmake code I need to make sure CPack includes all the proper libs and support libs. I currently build on OpenSuse 12.1 but can fire up about any linux distro that people think is "better" suited for this task. Do I release rpms? Tar.gz? Any guidance from those in the know would be just wonderful and very much appreciated.
> 
> If you use the bundleutilities module, it should be fairly simple to get a tar.gz or so containing the binaries (should, since I haven't done that myself yet). For distribution-native (deb, rpm, ...) packages the generators will need to be told about the dependencies, in particular how the various packages are named in the distribution. Those distro-packages will then only have your own projects binaries. If the project is open-source, the distributions mit also be willing to do the packaging and ship them with their releases. Then you'd merely need to provide source packages for them.
> 
> Andreas

Andreas,
   Thanks for the ideas. I use bundleUtilities for OS X but not for Linux. I should adapt my code to also include Linux. One of the issues I have is that I have an HDF5 and Qwt "external" libraries that I compiled myself that I need to include. Maybe I should just install the version that "ships" with my linux Distro and then make that a requirement to compile my code? Is that what is typically done on Linux? Are there examples on the Wiki or anywhere else that shows how to setup everything needed for a .deb or .rpm? I am basically very new to this and just need to be pointed in the right direction to get some sort of recipe.
  I am interested to figure out how ParaView does their bundling for linux. It looks like they just have a .tar.gz file to download which has everything. Maybe they statically link everything to make that work? Dunno.

Thanks
Mike Jackson


More information about the CMake mailing list