CMP0068.rst 1.4 KB

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