Imported Upstream version 3.17.1
[platform/upstream/cmake.git] / Help / prop_tgt / MACHO_COMPATIBILITY_VERSION.rst
1 MACHO_COMPATIBILITY_VERSION
2 ---------------------------
3
4 What compatibility version number is this target for Mach-O binaries.
5
6 For shared libraries on Mach-O systems (e.g. macOS, iOS)
7 the ``MACHO_COMPATIBILITY_VERSION`` property corresponds to the
8 *compatibility version* and :prop_tgt:`MACHO_CURRENT_VERSION` corresponds to
9 the *current version*.  These are both embedded in the shared library binary
10 and can be checked with the ``otool -L <binary>`` command.
11
12 It should be noted that the :prop_tgt:`MACHO_CURRENT_VERSION` and
13 ``MACHO_COMPATIBILITY_VERSION`` properties do not affect the file
14 names or version-related symlinks that CMake generates for the library.
15 The :prop_tgt:`VERSION` and :prop_tgt:`SOVERSION` target properties still
16 control the file and symlink names.  The ``install_name`` is also still
17 controlled by :prop_tgt:`SOVERSION`.
18
19 When :prop_tgt:`MACHO_CURRENT_VERSION` and ``MACHO_COMPATIBILITY_VERSION``
20 are not given, :prop_tgt:`VERSION` and :prop_tgt:`SOVERSION` are used for
21 the version details to be embedded in the binaries respectively.
22 The :prop_tgt:`MACHO_CURRENT_VERSION` and ``MACHO_COMPATIBILITY_VERSION``
23 properties only need to be given if the project needs to decouple the file
24 and symlink naming from the version details embedded in the binaries
25 (e.g. to match libtool conventions).