[CMake] How to build fully correctly versioned shared object files with cmake
Philip Van Hoof
philip at codeminded.be
Mon Aug 6 16:42:01 EDT 2018
Alexander Neundorf wrote:
> On Mon, 2018-08-06 at 21:54 +0200, Hendrik Sattler wrote:
> > Is there ANY reason to use libtool library versioning? It might
> > surprise people but it really is not any kind of standard.
> >
> > Just change the SOVERSION when you make incompatible ABI changes
> > and a normal library VERSION. There's really not more to it,
> > especially nothing like the sick results that libtool produces,
> > sometimes.
> I agree.
> I would recommend
> Major version = SO version, increase it if you break ABI
> compatibility
> Minor version: increase it if you add ABI compatible features
> Patch version: increase it for bug fix releases.
>
> Alex
Ok, I added this note to README.md, cmake, meson and qmake examples:
# When you don't care about compatibility with libtool's -version-info,
then you can take the following rules for VERSION in cmake, meson and
qmake:
# * SOVERSION = Major version
# * Major version: increase it if you break ABI compatibility
# * Minor version: increase it if you add ABI compatible features
# * Patch version: increase it for bug fix releases.
https://github.com/pvanhoof/dir-examples/commit/02a9a2d23ddf3627f87dd7a1af74b42603c4f890
(Because yes, you're right that libtool's -version-info is just
pointlessly complicated and messy for people who don't need to care)
Kind regards,
Philip Van Hoof
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <https://cmake.org/pipermail/cmake/attachments/20180806/b9c26676/attachment.sig>
More information about the CMake
mailing list