mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-06 05:40:54 -06:00
Help: Document conventional VERSION/SOVERSION relationship
Issue: #25626
This commit is contained in:
committed by
Brad King
parent
77dc558d1e
commit
fcab4bee21
@@ -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
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
|
||||
@@ -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
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
|
||||
9
Help/prop_tgt/VERSION_SOVERSION_EXAMPLE.txt
Normal file
9
Help/prop_tgt/VERSION_SOVERSION_EXAMPLE.txt
Normal 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.
|
||||
Reference in New Issue
Block a user