mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-26 08:08:24 -05:00
4aed96e230
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
19 lines
763 B
ReStructuredText
19 lines
763 B
ReStructuredText
INSTALL_NAME_DIR
|
|
----------------
|
|
|
|
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 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
|
|
created.
|
|
|
|
This property supports :manual:`generator expressions <cmake-generator-expressions(7)>`.
|
|
In particular, the :genex:`$<INSTALL_PREFIX>` generator expression can be
|
|
used to set the directory relative to the install-time prefix.
|