summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2018-02-02 17:58:44 -0800
committerEdward Thomson <ethomson@edwardthomson.com>2018-02-02 17:58:44 -0800
commit6416b91ffeb6863ce331f9370f817b08b260689d (patch)
tree50e4e7e305407d5a111c20e282e0bc047a34e24d
parent94aa36ef4418f559e505150d73da523c4f9aee58 (diff)
downloadlibgit2-6416b91ffeb6863ce331f9370f817b08b260689d.tar.gz
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.
-rw-r--r--CMakeLists.txt3
1 files changed, 3 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e4d5f4b15..a2a8a7418 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -17,6 +17,9 @@ CMAKE_POLICY(SET CMP0015 NEW)
IF (POLICY CMP0051)
CMAKE_POLICY(SET CMP0051 NEW)
ENDIF()
+IF (POLICY CMP0042)
+ CMAKE_POLICY(SET CMP0042 NEW)
+ENDIF()
# Add find modules to the path
SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${libgit2_SOURCE_DIR}/cmake/Modules/")