ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

Install SWIG python bindings in install space

asked 2020-04-19 08:27:52 -0600

prex gravatar image

updated 2020-04-22 07:12:54 -0600

We're using SWIG to generate python bindings for some C++ classes. This works fine in the devel space (cmake below). However, I can't figure out how to change our cmake to also install the python modules in the install space in addition. I can change the destinations from CATKIN_DEVEL_PREFIX to CMAKE_INSTALL_PREFIX for PYTHON_MODULE_DIR which does what I want. However, then the modules are not available in the devel space anymore. So how can I properly install my modules to the install space?

I tried to add the install macro to the cmake below:

# Install 
install(TARGETS ${SWIG_MODULE_${target}_REAL_NAME}

But the corresponding files are not installed to the install space. I only get a relatively empty and __init__.pyc. In the devel dist-package I have,,, package_namePYTHON_wrap.cxx.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2020-04-22 07:14:30 -0600

prex gravatar image

The install from my post just installs the .so libraries. We needed to add this additional install rule:

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2020-04-19 08:27:52 -0600

Seen: 253 times

Last updated: Apr 22 '20