Skip to content

Commit 97f7727

Browse files
authored
Use rpath for pypi artifact (#4411)
* Use rpath for pypi artifact * fix path * Update CMakeLists.txt add $ORIGIN as well
1 parent e480f7f commit 97f7727

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

CMakeLists.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -693,6 +693,14 @@ if(EXECUTORCH_BUILD_PYBIND)
693693
BUILD_RPATH "@loader_path/../../../torch/lib"
694694
INSTALL_RPATH "@loader_path/../../../torch/lib"
695695
)
696+
else()
697+
set_target_properties(
698+
portable_lib
699+
PROPERTIES # Assume that this library will be installed in
700+
# `site-packages/executorch/extension/pybindings`, and that
701+
# the custom_ops_aot_lib should be found with relative path.
702+
BUILD_RPATH "$ORIGIN:$ORIGIN/../../examples/models/llama2/custom_ops"
703+
)
696704
endif()
697705

698706
install(TARGETS portable_lib

0 commit comments

Comments
 (0)