From 52138b823299765af3f691de0bc58e7d699d2ee9 Mon Sep 17 00:00:00 2001 From: Leonardo de Moura Date: Thu, 13 Aug 2015 11:49:39 -0700 Subject: [PATCH] fix(CMakeLists): dylib generation --- src/CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) 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")