From c85127c973e3f8457e79bb2450c1e69c38f3e187 Mon Sep 17 00:00:00 2001 From: Michael Maltese Date: Tue, 24 Jan 2017 00:45:57 -0800 Subject: [PATCH] CMake: move CMAKE_MACOSX_RPATH with rest of macOS logic --- CMakeLists.txt | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e2ace7a4fb..862f847962 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -73,10 +73,6 @@ endif() # TODO: Add DSPSpy option(DSPTOOL "Build dsptool" OFF) -if (APPLE) - # This doesn't play with with the packaging script that doesn't understand @rpath - set(CMAKE_MACOSX_RPATH OFF) -endif() set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/CMakeTests) # Libraries to link set(LIBS) @@ -284,6 +280,9 @@ if(ENABLE_LTO) endif() if(APPLE) + # This doesn't play well with the packaging script that doesn't understand @rpath + set(CMAKE_MACOSX_RPATH OFF) + if(NOT OSX_USE_DEFAULT_SEARCH_PATH) # Hack up the path to prioritize the path to built-in OS libraries to # increase the chance of not depending on a bunch of copies of them