summaryrefslogtreecommitdiff
path: root/Help/prop_tgt/INSTALL_NAME_DIR.rst
diff options
context:
space:
mode:
authorCraig Scott <craig.scott@crascit.com>2021-04-06 10:12:09 +1000
committerCraig Scott <craig.scott@crascit.com>2021-04-06 11:46:56 +1000
commit4aed96e2309e64571aabfda263b3ca4c4f62d619 (patch)
treedd7b05e182f23dcc7491059e8995f9473bc4fb4b /Help/prop_tgt/INSTALL_NAME_DIR.rst
parent26af5908ec3be728b8ae487926b542be63e11af7 (diff)
downloadcmake-4aed96e2309e64571aabfda263b3ca4c4f62d619.tar.gz
Apple: Set CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG on non-macOS too
Since CMake 3.19, we no longer support macOS SDKs older than 10.5, which corresponds to Xcode 3. Supporting older Xcode versions for device platforms is also not realistic. We therefore expect the -rpath linker option should always be supported now. When targeting iOS, tvOS or watchOS, the previous disabling of -rpath support meant that the install_name_dir of shared libraries and frameworks was unable to use @rpath. This resulted in embedding absolute paths for their install_name. When they were embedded in an app bundle, this would cause the app to fail at runtime. By enabling the -rpath linker option, the default install_name_dir is now @rpath for these platforms, which results in binaries that do work at runtime. Fixes: #20036
Diffstat (limited to 'Help/prop_tgt/INSTALL_NAME_DIR.rst')
-rw-r--r--Help/prop_tgt/INSTALL_NAME_DIR.rst8
1 files changed, 5 insertions, 3 deletions
diff --git a/Help/prop_tgt/INSTALL_NAME_DIR.rst b/Help/prop_tgt/INSTALL_NAME_DIR.rst
index 8faefb71c5..47a003774f 100644
--- a/Help/prop_tgt/INSTALL_NAME_DIR.rst
+++ b/Help/prop_tgt/INSTALL_NAME_DIR.rst
@@ -1,11 +1,13 @@
INSTALL_NAME_DIR
----------------
-macOS directory name for installed targets.
+Directory name for installed targets on Apple platforms.
``INSTALL_NAME_DIR`` is a string specifying the directory portion of the
-"install_name" field of shared libraries on macOS to use in the
-installed targets.
+"install_name" field of shared libraries on Apple platforms for
+installed targets. When not set, the default directory used is determined
+by :prop_tgt:`MACOSX_RPATH`. Policies :policy:`CMP0068` and :policy:`CMP0042`
+are also relevant.
This property is initialized by the value of the variable
:variable:`CMAKE_INSTALL_NAME_DIR` if it is set when a target is