2013-10-15 19:17:36 +04:00
|
|
|
FRAMEWORK
|
|
|
|
---------
|
|
|
|
|
2015-11-11 07:37:15 +03:00
|
|
|
Build ``SHARED`` library as Framework Bundle on the OS X and iOS.
|
2013-10-15 19:17:36 +04:00
|
|
|
|
2015-11-11 07:37:15 +03:00
|
|
|
If a ``SHARED`` library target has this property set to ``TRUE`` it will be
|
|
|
|
built as a framework when built on the OS X and iOS. It will have the
|
2013-10-15 19:17:36 +04:00
|
|
|
directory structure required for a framework and will be suitable to
|
2015-07-14 21:57:02 +03:00
|
|
|
be used with the ``-framework`` option
|
|
|
|
|
2015-11-11 07:37:15 +03:00
|
|
|
To customize ``Info.plist`` file in the framework, use
|
|
|
|
:prop_tgt:`MACOSX_FRAMEWORK_INFO_PLIST` target property.
|
|
|
|
|
|
|
|
For OS X see also the :prop_tgt:`FRAMEWORK_VERSION` target property.
|
|
|
|
|
|
|
|
Example of creation ``dynamicFramework``:
|
|
|
|
|
|
|
|
.. code-block:: cmake
|
|
|
|
|
|
|
|
add_library(dynamicFramework SHARED
|
|
|
|
dynamicFramework.c
|
|
|
|
dynamicFramework.h
|
|
|
|
)
|
|
|
|
set_target_properties(dynamicFramework PROPERTIES
|
|
|
|
FRAMEWORK TRUE
|
|
|
|
FRAMEWORK_VERSION C
|
|
|
|
MACOSX_FRAMEWORK_IDENTIFIER com.cmake.dynamicFramework
|
|
|
|
MACOSX_FRAMEWORK_INFO_PLIST Info.plist
|
2016-06-20 15:34:09 +03:00
|
|
|
# "current version" in semantic format in Mach-O binary file
|
|
|
|
VERSION 16.4.0
|
|
|
|
# "compatibility version" in semantic format in Mach-O binary file
|
|
|
|
SOVERSION 1.0.0
|
2015-11-11 07:37:15 +03:00
|
|
|
PUBLIC_HEADER dynamicFramework.h
|
|
|
|
XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "iPhone Developer"
|
|
|
|
)
|