Skip to content

Commit

Permalink
Use rpath for pypi artifact (#4411)
Browse files Browse the repository at this point in the history
* Use rpath for pypi artifact

* fix path

* Update CMakeLists.txt

add $ORIGIN as well
  • Loading branch information
kirklandsign authored Jul 25, 2024
1 parent e480f7f commit 97f7727
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -693,6 +693,14 @@ if(EXECUTORCH_BUILD_PYBIND)
BUILD_RPATH "@loader_path/../../../torch/lib"
INSTALL_RPATH "@loader_path/../../../torch/lib"
)
else()
set_target_properties(
portable_lib
PROPERTIES # Assume that this library will be installed in
# `site-packages/executorch/extension/pybindings`, and that
# the custom_ops_aot_lib should be found with relative path.
BUILD_RPATH "$ORIGIN:$ORIGIN/../../examples/models/llama2/custom_ops"
)
endif()

install(TARGETS portable_lib
Expand Down

0 comments on commit 97f7727

Please sign in to comment.