Fixed apple rpath settings.
@@ -870,14 +870,15 @@ add_definitions("-DHAVE_CONFIG_H")
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h)
# RPATH configuration
-if(CMAKE_SKIP_RPATH)
- set(CMAKE_SKIP_RPATH FALSE)
- set(CMAKE_SKIP_INSTALL_RPATH TRUE)
-endif()
set(CMAKE_SKIP_BUILD_RPATH FALSE)
set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
+if (APPLE)
+ set(CMAKE_INSTALL_RPATH_USE_LINK_PATH FALSE)
+ set(CMAKE_INSTALL_RPATH "@loader_path/../Frameworks")
+else (APPLE)
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
set(CMAKE_INSTALL_RPATH "\$ORIGIN/../${CMAKE_INSTALL_LIBDIR}:\$ORIGIN/..")
+endif(APPLE)
if (BUILD_SHARED_LIBS)
set(CMAKE_MACOSX_RPATH ON)
