Skip to content

Commit 6416b91

Browse files
committed
cmake: enable policy CMP0042
Enable CMake policy CMP0042, if supported: > 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 > ``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.
1 parent 94aa36e commit 6416b91

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ CMAKE_POLICY(SET CMP0015 NEW)
1717
IF (POLICY CMP0051)
1818
CMAKE_POLICY(SET CMP0051 NEW)
1919
ENDIF()
20+
IF (POLICY CMP0042)
21+
CMAKE_POLICY(SET CMP0042 NEW)
22+
ENDIF()
2023

2124
# Add find modules to the path
2225
SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${libgit2_SOURCE_DIR}/cmake/Modules/")

0 commit comments

Comments
 (0)