Skip to content

Commit 43065d1

Browse files
Added RPATH to CMakeLists.txt
1 parent 944a797 commit 43065d1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,10 @@ pybind11_add_module(openfhe
7373
src/lib/pke/serialization.cpp
7474
src/lib/pke/cryptocontext_wrapper.cpp
7575
)
76+
# The next line ensures that the installed openfhe module can find its shared library dependencies
77+
# in the 'lib/' subdirectory relative to itself without requiring LD_LIBRARY_PATH.
78+
target_link_options(openfhe PRIVATE -Wl,-rpath,$ORIGIN/lib -Wl,--disable-new-dtags)
79+
7680
### Python installation
7781
# Allow the user to specify the path to Python executable (if not provided, find it)
7882
option(PYTHON_EXECUTABLE_PATH "Path to Python executable" "")

0 commit comments

Comments
 (0)