Merge topic 'osx-version-flags'

6a84f0b791 macOS: Test OSX_COMPATIBILITY_VERSION and OSX_CURRENT_VERSION properties
4a62e3d97c macOS: Add OSX_COMPATIBILITY_VERSION and OSX_CURRENT_VERSION properties

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4274
This commit is contained in:
Brad King
2020-01-28 15:58:21 +00:00
committed by Kitware Robot
16 changed files with 139 additions and 19 deletions

View File

@@ -302,6 +302,8 @@ Properties on Targets
/prop_tgt/OBJCXX_STANDARD_REQUIRED
/prop_tgt/OSX_ARCHITECTURES_CONFIG
/prop_tgt/OSX_ARCHITECTURES
/prop_tgt/OSX_CURRENT_VERSION
/prop_tgt/OSX_COMPATIBILITY_VERSION
/prop_tgt/OUTPUT_NAME_CONFIG
/prop_tgt/OUTPUT_NAME
/prop_tgt/PDB_NAME_CONFIG

View File

@@ -0,0 +1,14 @@
OSX_COMPATIBILITY_VERSION
-------------------------
What current version number is this target for OSX.
For shared libraries on Mach-O systems (e.g. macOS, iOS)
the ``OSX_COMPATIBILITY_VERSION`` property correspond to
``compatibility version`` and :prop_tgt:`OSX_CURRENT_VERSION` to
``current version``.
See the :prop_tgt:`FRAMEWORK` target property for an example.
Versions of Mach-O binaries may be checked with the ``otool -L <binary>``
command. If ``OSX_COMPATIBILITY_VERSION`` is not set, the value of
the :prop_tgt:``SOVERSION`` property will be used.

View File

@@ -0,0 +1,13 @@
OSX_CURRENT_VERSION
-------------------
What current version number is this target for OSX.
For shared libraries on Mach-O systems (e.g. macOS, iOS)
the :prop_tgt:`OSX_COMPATIBILITY_VERSION` property correspond to
``compatibility version`` and ``OSX_CURRENT_VERSION`` to ``current version``.
See the :prop_tgt:`FRAMEWORK` target property for an example.
Versions of Mach-O binaries may be checked with the ``otool -L <binary>``
command. If ``OSX_CURRENT_VERSION`` is not set, the value of
the :prop_tgt:``VERSION`` property will be used.

View File

@@ -21,7 +21,9 @@ Mach-O Versions
^^^^^^^^^^^^^^^
For shared libraries and executables on Mach-O systems (e.g. macOS, iOS),
the ``SOVERSION`` property corresponds to *compatibility version* and
:prop_tgt:`VERSION` to *current version*. See the :prop_tgt:`FRAMEWORK` target
property for an example. Versions of Mach-O binaries may be checked with the
``otool -L <binary>`` command.
the ``SOVERSION`` property is a fallback to
:prop_tgt:`OSX_COMPATIBILITY_VERSION` property which corresponds to
*compatiblity version* and :prop_tgt:`VERSION` is a fallback to
:prop_tgt:`OSX_CURRENT_VERSION` which corresponds to *current version*.
See the :prop_tgt:`FRAMEWORK` target property for an example. Versions
of Mach-O binaries may be checked with the ``otool -L <binary>`` command.

View File

@@ -23,7 +23,9 @@ Mach-O Versions
^^^^^^^^^^^^^^^
For shared libraries and executables on Mach-O systems (e.g. macOS, iOS),
the :prop_tgt:`SOVERSION` property correspond to *compatibility version* and
``VERSION`` to *current version*. See the :prop_tgt:`FRAMEWORK` target
the ``VERSION`` property is a fallback to :prop_tgt:`OSX_CURRENT_VERSION`
property which corresponds to *current version* and :prop_tgt:`SOVERSION`
is a fallback to :prop_tgt:`OSX_COMPATIBILITY_VERSION` which corresponds
to *compatiblity version*. See the :prop_tgt:`FRAMEWORK` target
property for an example. Versions of Mach-O binaries may be checked with the
``otool -L <binary>`` command.

View File

@@ -0,0 +1,9 @@
add_osx_compatiblity_property
-----------------------------
* Target properties :prop_tgt:`OSX_COMPATIBILITY_VERSION` and
:prop_tgt:`OSX_CURRENT_VERSION` were added to set the
``compatibility_version`` and ``curent_version`` respectively
on macOS. For backwards compatibility, if these properties
are not set, :prop_tgt:`SOVERSION` and :prop_tgt:`VERSION`
are used respectively as fallbacks.