CMP0068.rst 1.4 KB

1234567891011121314151617181920212223242526272829303132333435
  1. CMP0068
  2. -------
  3. ``RPATH`` settings on macOS do not affect ``install_name``.
  4. CMake 3.9 and newer remove any effect the following settings may have on the
  5. ``install_name`` of a target on macOS:
  6. * :prop_tgt:`BUILD_WITH_INSTALL_RPATH` target property
  7. * :prop_tgt:`SKIP_BUILD_RPATH` target property
  8. * :variable:`CMAKE_SKIP_RPATH` variable
  9. * :variable:`CMAKE_SKIP_INSTALL_RPATH` variable
  10. Previously, setting :prop_tgt:`BUILD_WITH_INSTALL_RPATH` had the effect of
  11. setting both the ``install_name`` of a target to :prop_tgt:`INSTALL_NAME_DIR`
  12. and the ``RPATH`` to :prop_tgt:`INSTALL_RPATH`. In CMake 3.9, it only affects
  13. setting of ``RPATH``. However, if one wants :prop_tgt:`INSTALL_NAME_DIR` to
  14. apply to the target in the build tree, one may set
  15. :prop_tgt:`BUILD_WITH_INSTALL_NAME_DIR`.
  16. If :prop_tgt:`SKIP_BUILD_RPATH`, :variable:`CMAKE_SKIP_RPATH` or
  17. :variable:`CMAKE_SKIP_INSTALL_RPATH` were used to strip the directory portion
  18. of the ``install_name`` of a target, one may set ``INSTALL_NAME_DIR=""``
  19. instead.
  20. The ``OLD`` behavior of this policy is to use the ``RPATH`` settings for
  21. ``install_name`` on macOS. The ``NEW`` behavior of this policy is to ignore
  22. the ``RPATH`` settings for ``install_name`` on macOS.
  23. This policy was introduced in CMake version 3.9. CMake version
  24. |release| warns when the policy is not set and uses ``OLD`` behavior.
  25. Use the :command:`cmake_policy` command to set it to ``OLD`` or ``NEW``
  26. explicitly.
  27. .. include:: DEPRECATED.txt