[CMake] Packaging Best Practices for Linux

Eric Noulard eric.noulard at gmail.com
Wed May 16 16:32:12 EDT 2012


2012/5/16 Michael Jackson <mike.jackson at bluequartz.net>:
[...]

>
> That was VERY informative. This is what I was afraid of. With Windows and OS X even though there are 3 or 4 versions if you build for the earliest one (XP or 10.5) the binary has a really good chance of still running on the latest (Win7 or Lion).

Yes but only if you ship the DLL/dylib you depend on with your
software which is pretty much the objective of BundleUtilities.

>  With Linux and so many distributions I don't have time to create that many different virtual machines to compile on each and every one. I am a single developer.

I understand that very well.

You may have a look at OBS: https://build.opensuse.org/
it may help you with "many-distro" building.

but as Dan said the *source* route is the way to go.
Once you source is giving you nice package (on MacOS, Windows & Linux etc...)
then you may offer a CMake script that **automatically**
1) download the source
2) configure & build with CMake
3) create a package with CPack

here is an example applied to CMake itself as proof of concept:
https://github.com/TheErk/CMake-tutorial/blob/master/examples/CMake-autobuild-v2.cmake

with this you get an "install-from-source" which should be painless
for your user.

-- 
Erk
Le gouvernement représentatif n'est pas la démocratie --
http://www.le-message.org


More information about the CMake mailing list