From d5aeb354495b9bfc834ebbc463e5ed0a14ec04f9 Mon Sep 17 00:00:00 2001 From: Nikolay Kasyanov Date: Fri, 13 Nov 2015 01:19:56 +0100 Subject: [PATCH] OS X: use link path for packaging to allow CMake infer library search dirs for @rpath resolving --- CMakeLists.txt | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e218923bf..5c996e3b4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -297,8 +297,7 @@ if (APPLE) set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${APP_BUNDLE_DIR}/Contents/MacOS") if (OPENMW_OSX_DEPLOYMENT) - SET(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE) - SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH FALSE) + SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) endif() else (APPLE) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${OpenMW_BINARY_DIR}") @@ -787,8 +786,6 @@ if (APPLE) install_plugins_for_bundle("${INSTALL_SUBDIR}/${APP_BUNDLE_NAME}" PLUGINS) install_plugins_for_bundle("${INSTALL_SUBDIR}/${OPENCS_BUNDLE_NAME}" OPENCS_PLUGINS) - set(DIRS "${CMAKE_PREFIX_PATH}/lib") - install(CODE " function(gp_item_default_embedded_path_override item default_embedded_path_var) if (\${item} MATCHES ${OSG_PLUGIN_PREFIX_DIR}) @@ -798,8 +795,8 @@ if (APPLE) endfunction() cmake_policy(SET CMP0009 OLD) - fixup_bundle(\"${INSTALLED_OPENMW_APP}\" \"${PLUGINS}\" \"${DIRS}\") - fixup_bundle(\"${INSTALLED_OPENCS_APP}\" \"${OPENCS_PLUGINS}\" \"${DIRS}\") + fixup_bundle(\"${INSTALLED_OPENMW_APP}\" \"${PLUGINS}\" \"\") + fixup_bundle(\"${INSTALLED_OPENCS_APP}\" \"${OPENCS_PLUGINS}\" \"\") " COMPONENT Runtime) include(CPack) endif (APPLE)