Skip to content

Commit 9b3e799

Browse files
authored
Fix RPath of python bindings (#8)
The python so have a path to the grandgrandparentdirectory as there are the origin libraries the bindings are binding to.
1 parent 8967cba commit 9b3e799

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
cmake_minimum_required(VERSION 3.5)
22

3-
project(xbot2_interface LANGUAGES CXX VERSION 1.1.0)
3+
project(xbot2_interface LANGUAGES CXX VERSION 1.1.1)
44

55
option(XBOT2_IFC_BUILD_PINOCCHIO "Build Pinocchio implementation" ON)
66
option(XBOT2_IFC_BUILD_RBDL "Build RBDL implementation" OFF)

python/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,17 @@ if(${pybind11_FOUND} AND ${COMPILE_PYTHON_BINDINGS})
2929

3030
target_link_libraries(pyxbot2_interface PUBLIC xbot2_interface)
3131

32+
set_target_properties(pyxbot2_interface PROPERTIES INSTALL_RPATH "$ORIGIN/../../..")
33+
3234
install(TARGETS pyxbot2_interface
3335
DESTINATION ${PYTHON_SITE}/xbot2_interface)
3436

3537

3638
pybind11_add_module(pyaffine3 pyaffine3.cpp)
3739

3840
target_link_libraries(pyaffine3 PUBLIC Eigen3::Eigen)
41+
42+
set_target_properties(pyaffine3 PROPERTIES INSTALL_RPATH "$ORIGIN/../../..")
3943

4044
install(TARGETS pyaffine3
4145
DESTINATION ${PYTHON_SITE}/xbot2_interface)
@@ -44,6 +48,8 @@ if(${pybind11_FOUND} AND ${COMPILE_PYTHON_BINDINGS})
4448
pybind11_add_module(pyxbot2_collision pyxbot2_collision.cpp)
4549

4650
target_link_libraries(pyxbot2_collision PUBLIC xbot2_interface::collision)
51+
52+
set_target_properties(pyxbot2_collision PROPERTIES INSTALL_RPATH "$ORIGIN/../../..")
4753

4854
install(TARGETS pyxbot2_collision
4955
DESTINATION ${PYTHON_SITE}/xbot2_interface)

0 commit comments

Comments
 (0)