mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-05-23 22:13:38 +00:00
Fix rpath issue with pybind. (#7829)
* Fix rpath issue with pybind * Address PR comment
This commit is contained in:
parent
29c68888af
commit
6ca1ee7733
2 changed files with 4 additions and 1 deletions
|
|
@ -75,6 +75,9 @@ elseif(onnxruntime_BUILD_APPLE_FRAMEWORK)
|
|||
)
|
||||
else()
|
||||
onnxruntime_add_shared_library(onnxruntime ${CMAKE_CURRENT_BINARY_DIR}/generated_source.c)
|
||||
if (onnxruntime_USE_CUDA)
|
||||
set_property(TARGET onnxruntime APPEND_STRING PROPERTY LINK_FLAGS " -Xlinker -rpath=\\$ORIGIN")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
add_dependencies(onnxruntime onnxruntime_generate_def ${onnxruntime_EXTERNAL_DEPENDENCIES})
|
||||
|
|
|
|||
|
|
@ -143,7 +143,7 @@ elseif (APPLE)
|
|||
INSTALL_RPATH_USE_LINK_PATH FALSE)
|
||||
else()
|
||||
target_link_libraries(onnxruntime_pybind11_state PRIVATE ${onnxruntime_pybind11_state_libs} ${onnxruntime_EXTERNAL_LIBRARIES})
|
||||
set_property(TARGET onnxruntime_pybind11_state APPEND_STRING PROPERTY LINK_FLAGS " -Xlinker -rpath=\$ORIGIN")
|
||||
set_property(TARGET onnxruntime_pybind11_state APPEND_STRING PROPERTY LINK_FLAGS " -Xlinker -rpath=\\$ORIGIN")
|
||||
endif()
|
||||
|
||||
set_target_properties(onnxruntime_pybind11_state PROPERTIES PREFIX "")
|
||||
|
|
|
|||
Loading…
Reference in a new issue