From a4d27ad489b2f112840b09fcea06ad5ee08ad1f2 Mon Sep 17 00:00:00 2001 From: Sam Hatchett Date: Mon, 25 Jul 2016 20:12:02 -0400 Subject: [PATCH] mac rpath in cmake --- build/CMake/CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/build/CMake/CMakeLists.txt b/build/CMake/CMakeLists.txt index 54fbc32..e3e65aa 100644 --- a/build/CMake/CMakeLists.txt +++ b/build/CMake/CMakeLists.txt @@ -8,6 +8,11 @@ SET(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin) project (EPANET) +IF(APPLE) + SET(CMAKE_INSTALL_NAME_DIR @executable_path) + SET(CMAKE_BUILD_WITH_INSTALL_RPATH ON) +ENDIF(APPLE) + # the library include_directories(../../include) file(GLOB EPANET_SOURCES ../../src/*.c)