Don't try to override how cmake uses CMAKE_BUILD_RPATH.
@@ -109,10 +109,6 @@ endif()
if(EXTRA_LINK_DIRECTORY)
link_directories(${EXTRA_LINK_DIRECTORY})
endif()
-if(CMAKE_BUILD_RPATH)
-set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-rpath,${CMAKE_BUILD_RPATH}")
-set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-rpath,${CMAKE_BUILD_RPATH}")
-endif()
if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin")
else()
