d6f8a941f7a0b8302b592d7e4e176954cb2641a4
[platform/upstream/cmake.git] / Help / prop_tgt / SOVERSION.rst
1 SOVERSION
2 ---------
3
4 What version number is this target.
5
6 For shared libraries :prop_tgt:`VERSION` and ``SOVERSION`` can be used to
7 specify the build version and API version respectively.  When building or
8 installing appropriate symlinks are created if the platform supports
9 symlinks and the linker supports so-names.  If only one of both is
10 specified the missing is assumed to have the same version number.
11 ``SOVERSION`` is ignored if :prop_tgt:`NO_SONAME` property is set.
12
13 Windows Versions
14 ^^^^^^^^^^^^^^^^
15
16 For shared libraries and executables on Windows the :prop_tgt:`VERSION`
17 attribute is parsed to extract a ``<major>.<minor>`` version number.
18 These numbers are used as the image version of the binary.
19
20 Mach-O Versions
21 ^^^^^^^^^^^^^^^
22
23 For shared libraries and executables on Mach-O systems (e.g. macOS, iOS),
24 the ``SOVERSION`` property is a fallback to
25 :prop_tgt:`MACHO_COMPATIBILITY_VERSION` property which corresponds to
26 *compatiblity version* and :prop_tgt:`VERSION` is a fallback to
27 :prop_tgt:`MACHO_CURRENT_VERSION` which corresponds to *current version*.
28 See the :prop_tgt:`FRAMEWORK` target property for an example.  Versions
29 of Mach-O binaries may be checked with the ``otool -L <binary>`` command.