summaryrefslogtreecommitdiffstats
path: root/Help/prop_tgt
diff options
context:
space:
mode:
authorCraig Scott <craig.scott@crascit.com>2021-04-06 00:12:09 (GMT)
committerCraig Scott <craig.scott@crascit.com>2021-04-06 01:46:56 (GMT)
commit4aed96e2309e64571aabfda263b3ca4c4f62d619 (patch)
treedd7b05e182f23dcc7491059e8995f9473bc4fb4b /Help/prop_tgt
parent26af5908ec3be728b8ae487926b542be63e11af7 (diff)
downloadCMake-4aed96e2309e64571aabfda263b3ca4c4f62d619.zip
CMake-4aed96e2309e64571aabfda263b3ca4c4f62d619.tar.gz
CMake-4aed96e2309e64571aabfda263b3ca4c4f62d619.tar.bz2
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')
-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 8faefb7..47a0037 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