Merge topic 'doc-apple-framework-creation'
eb8eaaec
Help: Document Apple Framework creation with an example (#15651)
This commit is contained in:
commit
b2eff70f6b
|
@ -33,6 +33,8 @@ type is ``STATIC`` or ``SHARED`` based on whether the current value of the
|
||||||
variable :variable:`BUILD_SHARED_LIBS` is ``ON``. For ``SHARED`` and
|
variable :variable:`BUILD_SHARED_LIBS` is ``ON``. For ``SHARED`` and
|
||||||
``MODULE`` libraries the :prop_tgt:`POSITION_INDEPENDENT_CODE` target
|
``MODULE`` libraries the :prop_tgt:`POSITION_INDEPENDENT_CODE` target
|
||||||
property is set to ``ON`` automatically.
|
property is set to ``ON`` automatically.
|
||||||
|
A ``SHARED`` library may be marked with the :prop_tgt:`FRAMEWORK`
|
||||||
|
target property to create an OS X Framework.
|
||||||
|
|
||||||
By default the library file will be created in the build tree directory
|
By default the library file will be created in the build tree directory
|
||||||
corresponding to the source tree directory in which the command was
|
corresponding to the source tree directory in which the command was
|
||||||
|
|
|
@ -85,6 +85,22 @@ It is a type which is loaded as a plugin using runtime techniques.
|
||||||
|
|
||||||
add_library(archive MODULE 7z.cpp)
|
add_library(archive MODULE 7z.cpp)
|
||||||
|
|
||||||
|
.. _`Apple Frameworks`:
|
||||||
|
|
||||||
|
Apple Frameworks
|
||||||
|
""""""""""""""""
|
||||||
|
|
||||||
|
A ``SHARED`` library may be marked with the :prop_tgt:`FRAMEWORK`
|
||||||
|
target property to create an OS X Framework:
|
||||||
|
|
||||||
|
.. code-block:: cmake
|
||||||
|
|
||||||
|
add_library(MyFramework SHARED MyFramework.cpp)
|
||||||
|
set_target_properties(MyFramework PROPERTIES
|
||||||
|
FRAMEWORK 1
|
||||||
|
FRAMEWORK_VERSION A
|
||||||
|
)
|
||||||
|
|
||||||
.. _`Object Libraries`:
|
.. _`Object Libraries`:
|
||||||
|
|
||||||
Object Libraries
|
Object Libraries
|
||||||
|
|
|
@ -135,6 +135,7 @@ Properties on Targets
|
||||||
/prop_tgt/Fortran_FORMAT
|
/prop_tgt/Fortran_FORMAT
|
||||||
/prop_tgt/Fortran_MODULE_DIRECTORY
|
/prop_tgt/Fortran_MODULE_DIRECTORY
|
||||||
/prop_tgt/FRAMEWORK
|
/prop_tgt/FRAMEWORK
|
||||||
|
/prop_tgt/FRAMEWORK_VERSION
|
||||||
/prop_tgt/GENERATOR_FILE_NAME
|
/prop_tgt/GENERATOR_FILE_NAME
|
||||||
/prop_tgt/GNUtoMS
|
/prop_tgt/GNUtoMS
|
||||||
/prop_tgt/HAS_CXX
|
/prop_tgt/HAS_CXX
|
||||||
|
|
|
@ -6,4 +6,6 @@ This target is a framework on the Mac.
|
||||||
If a shared library target has this property set to true it will be
|
If a shared library target has this property set to true it will be
|
||||||
built as a framework when built on the mac. It will have the
|
built as a framework when built on the mac. It will have the
|
||||||
directory structure required for a framework and will be suitable to
|
directory structure required for a framework and will be suitable to
|
||||||
be used with the -framework option
|
be used with the ``-framework`` option
|
||||||
|
|
||||||
|
See also the :prop_tgt:`FRAMEWORK_VERSION` target property.
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
FRAMEWORK_VERSION
|
||||||
|
-----------------
|
||||||
|
|
||||||
|
Version of a framework created using the :prop_tgt:`FRAMEWORK` target
|
||||||
|
property (e.g. ``A``).
|
Loading…
Reference in New Issue