This repository was archived by the owner on Jan 3, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
src/ngraph/runtime/plaidml Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -306,12 +306,12 @@ set(NGRAPH_INSTALL_DOC "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DOCDIR}")
306306set (NGRAPH_INSTALL_BIN "${CMAKE_INSTALL_PREFIX} /${CMAKE_INSTALL_BINDIR} " )
307307if (LINUX)
308308 if (DEFINED NGRAPH_RPATH)
309+ set (CMAKE_BUILD_RPATH "$ORIGIN:${NGRAPH_RPATH} " )
309310 set (CMAKE_INSTALL_RPATH "$ORIGIN:${NGRAPH_RPATH} " )
310311 else ()
312+ set (CMAKE_BUILD_RPATH "$ORIGIN" )
311313 set (CMAKE_INSTALL_RPATH "$ORIGIN" )
312314 endif ()
313- set (CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE )
314- set (CMAKE_BUILD_WITH_INSTALL_RPATH TRUE )
315315endif ()
316316
317317#-----------------------------------------------------------------------------------------------
Original file line number Diff line number Diff line change @@ -75,3 +75,11 @@ target_include_directories(plaidml_backend SYSTEM PUBLIC ${PLAIDML_INCLUDE_DIRS}
7575target_link_libraries (plaidml_backend PUBLIC ngraph libplaidml)
7676install (TARGETS plaidml_backend LIBRARY DESTINATION ${NGRAPH_INSTALL_LIB} )
7777
78+ set (CMAKE_MACOSX_RPATH 1)
79+ if (APPLE )
80+ set_property (TARGET plaidml_backend PROPERTY INSTALL_RPATH "@loader_path/;@loader_path/../../.." )
81+ elseif (DEFINED NGRAPH_RPATH)
82+ set_property (TARGET plaidml_backend PROPERTY INSTALL_RPATH "\$ ORIGIN;\$ ORIGIN/../../..;${NGRAPH_RPATH} " )
83+ else ()
84+ set_property (TARGET plaidml_backend PROPERTY INSTALL_RPATH "\$ ORIGIN;\$ ORIGIN/../../.." )
85+ endif ()
You can’t perform that action at this time.
0 commit comments