MACOSX_RPATH.rst 906 B

1234567891011121314151617181920212223
  1. MACOSX_RPATH
  2. ------------
  3. Whether this target on OS X or iOS is located at runtime using rpaths.
  4. When this property is set to ``TRUE``, the directory portion of
  5. the ``install_name`` field of this shared library will be ``@rpath``
  6. unless overridden by :prop_tgt:`INSTALL_NAME_DIR`. This indicates
  7. the shared library is to be found at runtime using runtime
  8. paths (rpaths).
  9. This property is initialized by the value of the variable
  10. :variable:`CMAKE_MACOSX_RPATH` if it is set when a target is
  11. created.
  12. Runtime paths will also be embedded in binaries using this target and
  13. can be controlled by the :prop_tgt:`INSTALL_RPATH` target property on
  14. the target linking to this target.
  15. Policy :policy:`CMP0042` was introduced to change the default value of
  16. ``MACOSX_RPATH`` to ``TRUE``. This is because use of ``@rpath`` is a
  17. more flexible and powerful alternative to ``@executable_path`` and
  18. ``@loader_path``.