mirror of
https://github.com/jbeder/yaml-cpp.git
synced 2025-09-09 20:51:16 +00:00
Enable rpath on OS X when the CMake version supports it (#418)
CMake policy CMP0042 changes the default value of the MACOSX_RPATH target property to TRUE, therefore setting the directory portion of the install_name field of a shared library to be @rpath on OS X.
This commit is contained in:
@@ -12,6 +12,11 @@ endif()
|
|||||||
if(POLICY CMP0015)
|
if(POLICY CMP0015)
|
||||||
cmake_policy(SET CMP0015 OLD)
|
cmake_policy(SET CMP0015 OLD)
|
||||||
endif()
|
endif()
|
||||||
|
# see https://cmake.org/cmake/help/latest/policy/CMP0042.html
|
||||||
|
if(POLICY CMP0042)
|
||||||
|
# Enable MACOSX_RPATH by default.
|
||||||
|
cmake_policy(SET CMP0042 NEW)
|
||||||
|
endif()
|
||||||
|
|
||||||
include(CheckCXXCompilerFlag)
|
include(CheckCXXCompilerFlag)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user