diff options
author | Brad King <brad.king@kitware.com> | 2024-02-05 14:58:30 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2024-02-05 14:58:40 (GMT) |
commit | e33ca9ee839ddf3be83a642ea19e9a54b28bd683 (patch) | |
tree | ca50c064450e3e5a10c8bdf85f89dd3979c6dc61 /Help | |
parent | f81e16af53811393dbcef277b8c2a9f4c987eebb (diff) | |
parent | fcab4bee21ab69ca32df9a745d645766aeac0aa6 (diff) | |
download | CMake-e33ca9ee839ddf3be83a642ea19e9a54b28bd683.zip CMake-e33ca9ee839ddf3be83a642ea19e9a54b28bd683.tar.gz CMake-e33ca9ee839ddf3be83a642ea19e9a54b28bd683.tar.bz2 |
Merge topic 'doc-SOVERSION-first-component-VERSION'
fcab4bee21 Help: Document conventional VERSION/SOVERSION relationship
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9177
Diffstat (limited to 'Help')
-rw-r--r-- | Help/prop_tgt/SOVERSION.rst | 6 | ||||
-rw-r--r-- | Help/prop_tgt/VERSION.rst | 6 | ||||
-rw-r--r-- | Help/prop_tgt/VERSION_SOVERSION_EXAMPLE.txt | 9 |
3 files changed, 17 insertions, 4 deletions
diff --git a/Help/prop_tgt/SOVERSION.rst b/Help/prop_tgt/SOVERSION.rst index b377f22..4f8b1b5 100644 --- a/Help/prop_tgt/SOVERSION.rst +++ b/Help/prop_tgt/SOVERSION.rst @@ -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 ^^^^^^^^^^^^^^^^ diff --git a/Help/prop_tgt/VERSION.rst b/Help/prop_tgt/VERSION.rst index 95db483..f9cb020 100644 --- a/Help/prop_tgt/VERSION.rst +++ b/Help/prop_tgt/VERSION.rst @@ -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 ^^^^^^^^^^^^^^^^ diff --git a/Help/prop_tgt/VERSION_SOVERSION_EXAMPLE.txt b/Help/prop_tgt/VERSION_SOVERSION_EXAMPLE.txt new file mode 100644 index 0000000..ff2a958 --- /dev/null +++ b/Help/prop_tgt/VERSION_SOVERSION_EXAMPLE.txt @@ -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. |