Commit 27cda366 authored by David E. DeMarle's avatar David E. DeMarle
Browse files

add installed rpath to openvkl to make SB's build run as is

Without this the runtime module loading fails without path
modifications. The ctest -R cpack'd install has the
correct package relative rpath regardless.
parent c4b864bb
......@@ -7,3 +7,5 @@ superbuild_add_project(openvkl
-DCMAKE_INSTALL_NAME_DIR:PATH=<INSTALL_DIR>/lib
-DCMAKE_INSTALL_LIBDIR:STRING=lib
-DISPC_EXECUTABLE:PATH=<INSTALL_DIR>/bin/ispc)
superbuild_apply_patch(openvkl install-rpath "make rpath for superbuild to modify")
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1aef5d9..eb5d9ca 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -21,6 +21,15 @@ set(CMAKE_POSITION_INDEPENDENT_CODE ON)
project(openvkl VERSION 0.11.0 LANGUAGES C CXX)
+#put rpath into install tree for ParaViewSB to fixup after
+set(CMAKE_SKIP_INSTALL_RPATH OFF)
+if (APPLE)
+ set(CMAKE_MACOSX_RPATH ON)
+ set(CMAKE_INSTALL_RPATH "@executable_path/" "@executable_path/../${CMAKE_INSTALL_LIBDIR}")
+else()
+ set(CMAKE_INSTALL_RPATH "\$ORIGIN:\$ORIGIN/../${CMAKE_INSTALL_LIBDIR}")
+endif()
+
## Add openvkl specific macros ##
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/cmake)
Supports Markdown
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