diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 11b2a8606..758e37e5d 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -123,6 +123,13 @@ set(CPACK_PACKAGE_FILE_NAME "Lean-${LEAN_VERSION_MAJOR}.${LEAN_VERSION_MINOR}") set(CPACK_PACKAGE_ICON "${LEAN_SOURCE_DIR}/../images/lean.png") ################## +# Set a consistent MACOSX_RPATH default across all CMake versions. +# When CMake 2.8.12 is required, change this default to 1. +# When CMake 3.0.0 is required, remove this block (see CMP0042). +if (NOT DEFINED CMAKE_MACOSX_RPATH) + set(CMAKE_MACOSX_RPATH 0) +endif() + if (${CMAKE_SYSTEM_NAME} MATCHES "Linux") # The following options is needed to generate a shared library set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")