Skip to content

Commit 90e5b8c

Browse files
authored
Merge pull request #248 from openfheorg/dev
Fixes to CMakeLists.txt to find the installed .so (#247)
2 parents 714720f + 5b3e86a commit 90e5b8c

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

CMakeLists.txt

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ project (OpenFHE-Python)
55
set(OPENFHE_PYTHON_VERSION_MAJOR 1)
66
set(OPENFHE_PYTHON_VERSION_MINOR 4)
77
set(OPENFHE_PYTHON_VERSION_PATCH 0)
8-
set(OPENFHE_PYTHON_VERSION_TWEAK 0)
8+
set(OPENFHE_PYTHON_VERSION_TWEAK 1)
99
set(OPENFHE_PYTHON_VERSION ${OPENFHE_PYTHON_VERSION_MAJOR}.${OPENFHE_PYTHON_VERSION_MINOR}.${OPENFHE_PYTHON_VERSION_PATCH}.${OPENFHE_PYTHON_VERSION_TWEAK})
1010

1111
# OpenFHE version can be specified externally (-DOPENFHE_REQUIRED_VERSION=1.4.0)
@@ -74,7 +74,15 @@ pybind11_add_module(openfhe
7474
)
7575
# The next line ensures that the installed openfhe module can find its shared library dependencies
7676
# in the 'lib/' subdirectory relative to itself without requiring LD_LIBRARY_PATH.
77-
target_link_options(openfhe PRIVATE "-Wl,-rpath=$ORIGIN/lib" "-Wl,--disable-new-dtags")
77+
### target_link_options(openfhe PRIVATE "-Wl,-rpath=$ORIGIN/lib" "-Wl,--disable-new-dtags")
78+
target_link_options(openfhe PRIVATE "-Wl,--enable-new-dtags" "-Wl,-rpath,\$ORIGIN/lib")
79+
80+
# Also set target RPATH properties (survive install/copying)
81+
set_target_properties(openfhe PROPERTIES
82+
BUILD_RPATH "\$ORIGIN/lib"
83+
INSTALL_RPATH "\$ORIGIN/lib"
84+
)
85+
7886

7987
### Python installation
8088
# Allow the user to specify the path to Python executable (if not provided, find it)

0 commit comments

Comments
 (0)