From fc21cb49cb3d9402a2ad18020b8c28ff273a9f48 Mon Sep 17 00:00:00 2001 From: lvzhaoyang Date: Wed, 22 Oct 2014 23:27:01 -0400 Subject: [PATCH 1/2] issue#124. Turn off MacOS relative flag in building cmake. --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6fcce54b6..db3e5f2af 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,6 +2,10 @@ project(GTSAM CXX C) cmake_minimum_required(VERSION 2.6) +# new feature to Cmake Version > 2.8.12 +# turn off the MACOS Relative Path flag. +set(CMAKE_MACOSX_RPATH 0) + # Set the version number for the library set (GTSAM_VERSION_MAJOR 3) set (GTSAM_VERSION_MINOR 1) From c3ac45b05b86bf5a494bbf614a149bb40351604c Mon Sep 17 00:00:00 2001 From: lvzhaoyang Date: Wed, 22 Oct 2014 23:42:35 -0400 Subject: [PATCH 2/2] issue #124. Turn off Mac RPATH on non Mac machines work. --- CMakeLists.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index db3e5f2af..bc7d8aecd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,8 +3,10 @@ project(GTSAM CXX C) cmake_minimum_required(VERSION 2.6) # new feature to Cmake Version > 2.8.12 -# turn off the MACOS Relative Path flag. -set(CMAKE_MACOSX_RPATH 0) +# Mac ONLY. Define Relative Path on Mac OS +if(NOT DEFINED CMAKE_MACOSX_RPATH) + set(CMAKE_MACOSX_RPATH 0) +endif() # Set the version number for the library set (GTSAM_VERSION_MAJOR 3)