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