Commit 2e495c79 authored by Ben Boeckel's avatar Ben Boeckel

osx: use @rpath for library discovery

parent e0e44b8f
Pipeline #6510 passed with stage
......@@ -342,6 +342,10 @@ FUNCTION(build_paraview_client BPC_NAME)
ENDIF ()
SET_TARGET_PROPERTIES(${BPC_NAME} PROPERTIES
MACOSX_BUNDLE_BUNDLE_NAME "${BPC_APPLICATION_NAME}")
if (NOT PARAVIEW_DO_UNIX_STYLE_INSTALLS)
set_target_properties("${BPC_NAME}" PROPERTIES
INSTALL_RPATH "@executable_path/../Libraries;@executable_path/../Plugins")
endif ()
ENDIF ()
IF (PARAVIEW_QT_VERSION VERSION_GREATER "4")
......
......@@ -427,6 +427,10 @@ function(pv_add_executable name)
if (PV_EXE_JOB_LINK_POOL)
set_property(TARGET "${name}" PROPERTY JOB_POOL_LINK ${PV_EXE_JOB_LINK_POOL})
endif ()
if (APPLE AND NOT PARAVIEW_DO_UNIX_STYLE_INSTALLS)
set_target_properties("${name}" PROPERTIES
INSTALL_RPATH "@executable_path/../Libraries;@executable_path/../Plugins")
endif ()
pv_executable_install(${name} "${VTK_EXE_SUFFIX}")
endfunction()
......
......@@ -329,9 +329,7 @@ if (APPLE AND PARAVIEW_DO_UNIX_STYLE_INSTALLS)
# same place as ParaView's binaries.
set(CMAKE_INSTALL_NAME_DIR "${PARAVIEW_CUSTOM_INSTALL_NAME_DIR}/${VTK_INSTALL_LIBRARY_DIR}")
else ()
# Set CMAKE_INSTALL_NAME_DIR to point to the libraries directory relative
# to the executable.
set(CMAKE_INSTALL_NAME_DIR "@executable_path/../${VTK_INSTALL_LIBRARY_DIR}")
set(CMAKE_INSTALL_NAME_DIR "@rpath/")
endif ()
# ensure that we don't build forwarding executables on apple.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment