Ask Your Question
0

How to add Python Modules into catkin libraries so they can be imported by other packages

asked 2015-02-05 21:51:35 -0500

Jarvis gravatar image

Hi,

I want to create some python modules which are common for multiple ros packages. Can anyone guide me on how to list them in CMakeLists.txt file so they get insatlled in lib/python2.7/dist-packages directory? So far I have tried adding following lines

 add_library(python_module_library scripts/common.py)
 set_target_properties(python_module_library
          PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CATKIN_DEVEL_PREFIX}/${CATKIN_PACKAGE_PYTHON_DESTINATION}

This is giving me CMake Error as:

 CMake Error: CMake can not determine linker language for target: python_module_library
 CMake Error: Cannot determine link language for target "python_module_library".

Any Ideas?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2015-02-06 02:51:41 -0500

gvdhoorn gravatar image
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

1 follower

Stats

Asked: 2015-02-05 21:51:35 -0500

Seen: 627 times

Last updated: Feb 06 '15