diff options
author | Brad King <brad.king@kitware.com> | 2014-01-02 19:23:09 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2014-01-02 19:23:09 (GMT) |
commit | 0d63bdd2d9690cfdb43671af7465704675a68733 (patch) | |
tree | 17370b9ce679a48de0ed5f3baf7cddd27ed08e01 /Help | |
parent | c0ea0604a0dcd1d580e9b6a976aae0069cab2986 (diff) | |
parent | d25ad482e978cbf5e4fcfa8b1dcc342ba93dcda0 (diff) | |
download | CMake-0d63bdd2d9690cfdb43671af7465704675a68733.zip CMake-0d63bdd2d9690cfdb43671af7465704675a68733.tar.gz CMake-0d63bdd2d9690cfdb43671af7465704675a68733.tar.bz2 |
Merge topic 'rpath-default'
d25ad48 OS X: Add CMP0042 to enable MACOSX_RPATH by default
Diffstat (limited to 'Help')
-rw-r--r-- | Help/manual/cmake-policies.7.rst | 1 | ||||
-rw-r--r-- | Help/manual/cmake-variables.7.rst | 1 | ||||
-rw-r--r-- | Help/policy/CMP0042.rst | 19 | ||||
-rw-r--r-- | Help/prop_tgt/MACOSX_RPATH.rst | 16 | ||||
-rw-r--r-- | Help/variable/CMAKE_MACOSX_RPATH.rst | 7 |
5 files changed, 40 insertions, 4 deletions
diff --git a/Help/manual/cmake-policies.7.rst b/Help/manual/cmake-policies.7.rst index 9e26392..d467c36 100644 --- a/Help/manual/cmake-policies.7.rst +++ b/Help/manual/cmake-policies.7.rst @@ -89,3 +89,4 @@ All Policies /policy/CMP0039 /policy/CMP0040 /policy/CMP0041 + /policy/CMP0042 diff --git a/Help/manual/cmake-variables.7.rst b/Help/manual/cmake-variables.7.rst index d86db37..aebfe87 100644 --- a/Help/manual/cmake-variables.7.rst +++ b/Help/manual/cmake-variables.7.rst @@ -207,6 +207,7 @@ Variables that Control the Build /variable/CMAKE_LINK_LIBRARY_FILE_FLAG /variable/CMAKE_LINK_LIBRARY_FLAG /variable/CMAKE_MACOSX_BUNDLE + /variable/CMAKE_MACOSX_RPATH /variable/CMAKE_MAP_IMPORTED_CONFIG_CONFIG /variable/CMAKE_MODULE_LINKER_FLAGS_CONFIG /variable/CMAKE_MODULE_LINKER_FLAGS diff --git a/Help/policy/CMP0042.rst b/Help/policy/CMP0042.rst new file mode 100644 index 0000000..0ed3bd1 --- /dev/null +++ b/Help/policy/CMP0042.rst @@ -0,0 +1,19 @@ +CMP0042 +------- + +:prop_tgt:`MACOSX_RPATH` is enabled by default. + +CMake 2.8.12 and newer has support for using ``@rpath`` in a target's install +name. This was enabled by setting the target property +:prop_tgt:`MACOSX_RPATH`. The ``@rpath`` in an install name is a more +flexible and powerful mechanism than ``@executable_path`` or ``@loader_path`` +for locating shared libraries. + +CMake 3.0.0 and later prefer this property to be ON by default. Projects +wanting ``@rpath`` in a target's install name may remove any setting of +the :prop_tgt:`INSTALL_NAME_DIR` and :variable:`CMAKE_INSTALL_NAME_DIR` +variables. + +This policy was introduced in CMake version 3.0.0. CMake version +|release| warns when the policy is not set and uses OLD behavior. Use +the cmake_policy command to set it to OLD or NEW explicitly. diff --git a/Help/prop_tgt/MACOSX_RPATH.rst b/Help/prop_tgt/MACOSX_RPATH.rst index f2d8078..d3934ba 100644 --- a/Help/prop_tgt/MACOSX_RPATH.rst +++ b/Help/prop_tgt/MACOSX_RPATH.rst @@ -4,7 +4,15 @@ MACOSX_RPATH Whether to use rpaths on Mac OS X. When this property is set to true, the directory portion of -the"install_name" field of shared libraries will default to -"@rpath".Runtime paths will also be embedded in binaries using this -target.This property is initialized by the value of the variable -CMAKE_MACOSX_RPATH if it is set when a target is created. +the "install_name" field of shared libraries will be ``@rpath`` +unless overridden by :prop_tgt:`INSTALL_NAME_DIR`. Runtime +paths will also be embedded in binaries using this target and +can be controlled by the :prop_tgt:`INSTALL_RPATH` target property. +This property is initialized by the value of the variable +:variable:`CMAKE_MACOSX_RPATH` if it is set when a target is +created. + +Policy CMP0042 was introduced to change the default value of +MACOSX_RPATH to ON. This is because use of ``@rpath`` is a +more flexible and powerful alternative to ``@executable_path`` and +``@loader_path``. diff --git a/Help/variable/CMAKE_MACOSX_RPATH.rst b/Help/variable/CMAKE_MACOSX_RPATH.rst new file mode 100644 index 0000000..ac897c0 --- /dev/null +++ b/Help/variable/CMAKE_MACOSX_RPATH.rst @@ -0,0 +1,7 @@ +CMAKE_MACOSX_RPATH +------------------- + +Whether to use rpaths on Mac OS X. + +This variable is used to initialize the :prop_tgt:`MACOSX_RPATH` property on +all targets. |