How can catkin find ROS libraries in non-standard locations?
Actually the complete question would be: How can catkin find ROS libraries in non-standard locations, or is it ok not to write a library for Python in catkin_package(...)
?
I wrote a library in C++ for Python to wrap a C++ class. For it to be usable in Python I needed to change the default location. Extract of CMakeLists.txt
in package crossing_detector
:
set_target_properties(crossing_detector_wrapper_cpp PROPERTIES
PREFIX ""
LIBRARY_OUTPUT_DIRECTORY ${CATKIN_DEVEL_PREFIX}/${CATKIN_PACKAGE_PYTHON_DESTINATION})
This work well in the sense that I can use it in Python with
from crossing_detector.crossing_detector_wrapper_cpp import CrossingDetectorWrapper
The problem comes when I want to compile separately (catkin_make_isolated
or catkin build
) another package that depends on crossing_detector
, catkin complains about a missing library:
Project 'dataset_analyzer' tried to find library 'crossing_detector_wrapper_cpp'. The library is neither a target nor built/installed properly The library is not even needed there.
The problem doesn't occur when compiling both packages together (catkin_make
).
See also: https://github.com/catkin/catkin_tool...
I'm thinking of solving the problem by removing the library from catkin_package(...)
. Is this ok to do so?