From 8ac88201d73a8abfae050b6badfac31670357c5d Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Tue, 17 Oct 2017 19:16:22 -0500 Subject: [PATCH] Fix issue with RPATH on macOS --- CMakeLists.txt | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a076cb75..6246c1b9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -27,8 +27,13 @@ if(NOSTALGIA_IDE_BUILD STREQUAL "ON") set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) endif() -set(CMAKE_INSTALL_RPATH "$ORIGIN" "$ORIGIN/../lib/nostalgia") -set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE) + +if (APPLE) + set(CMAKE_MACOSX_RPATH ON) +else() + set(CMAKE_INSTALL_RPATH "$ORIGIN" "$ORIGIN/../lib/nostalgia") + set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE) +endif() if (CMAKE_BUILD_TYPE STREQUAL "Release") add_definitions(