Help: Document conventional VERSION/SOVERSION relationship

Issue: #25626
This commit is contained in:
Sune Stolborg Vuorela
2024-01-23 09:06:36 -05:00
committed by Brad King
parent 77dc558d1e
commit fcab4bee21
3 changed files with 17 additions and 4 deletions

View File

@@ -1,15 +1,17 @@
SOVERSION
---------
What version number is this target.
ABI version number of a shared library target.
For shared libraries :prop_tgt:`VERSION` and ``SOVERSION`` can be used to
specify the build version and API version respectively. When building or
specify the build version and ABI version respectively. When building or
installing appropriate symlinks are created if the platform supports
symlinks and the linker supports so-names. If only one of both is
specified the missing is assumed to have the same version number.
``SOVERSION`` is ignored if :prop_tgt:`NO_SONAME` property is set.
.. include:: VERSION_SOVERSION_EXAMPLE.txt
Windows Versions
^^^^^^^^^^^^^^^^

View File

@@ -1,10 +1,10 @@
VERSION
-------
What version number is this target.
Version number of a shared library target.
For shared libraries ``VERSION`` and :prop_tgt:`SOVERSION` can be used
to specify the build version and API version respectively. When building or
to specify the build version and ABI version respectively. When building or
installing appropriate symlinks are created if the platform supports
symlinks and the linker supports so-names. If only one of both is
specified the missing is assumed to have the same version number. For
@@ -12,6 +12,8 @@ executables ``VERSION`` can be used to specify the build version. When
building or installing appropriate symlinks are created if the
platform supports symlinks.
.. include:: VERSION_SOVERSION_EXAMPLE.txt
Windows Versions
^^^^^^^^^^^^^^^^

View File

@@ -0,0 +1,9 @@
A common convention is to specify both ``VERSION`` and ``SOVERSION``
such that ``SOVERSION`` matches the first component of ``VERSION``:
.. code-block:: cmake
set_target_properties(mylib PROPERTIES VERSION 1.2.3 SOVERSION 1)
The idea is that breaking changes to the ABI increment both the
``SOVERSION`` and the major ``VERSION`` number.