FRAMEWORK.rst 1.2 KB

1234567891011121314151617181920212223242526272829303132333435
  1. FRAMEWORK
  2. ---------
  3. Build ``SHARED`` or ``STATIC`` library as Framework Bundle on the OS X and iOS.
  4. If such a library target has this property set to ``TRUE`` it will be
  5. built as a framework when built on the OS X and iOS. It will have the
  6. directory structure required for a framework and will be suitable to
  7. be used with the ``-framework`` option
  8. To customize ``Info.plist`` file in the framework, use
  9. :prop_tgt:`MACOSX_FRAMEWORK_INFO_PLIST` target property.
  10. For OS X see also the :prop_tgt:`FRAMEWORK_VERSION` target property.
  11. Example of creation ``dynamicFramework``:
  12. .. code-block:: cmake
  13. add_library(dynamicFramework SHARED
  14. dynamicFramework.c
  15. dynamicFramework.h
  16. )
  17. set_target_properties(dynamicFramework PROPERTIES
  18. FRAMEWORK TRUE
  19. FRAMEWORK_VERSION C
  20. MACOSX_FRAMEWORK_IDENTIFIER com.cmake.dynamicFramework
  21. MACOSX_FRAMEWORK_INFO_PLIST Info.plist
  22. # "current version" in semantic format in Mach-O binary file
  23. VERSION 16.4.0
  24. # "compatibility version" in semantic format in Mach-O binary file
  25. SOVERSION 1.0.0
  26. PUBLIC_HEADER dynamicFramework.h
  27. XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "iPhone Developer"
  28. )