Hi all,
I have been compiling a library and made it ROS compatible - and everything works except that the includes are not copied to the devel/lib/PACKAGE folder.
I have added:
include_directories(${catkin_INCLUDE_DIRS} include)
and
DEPENDS pthread
INCLUDE_DIRS ${catkin_INCLUDE_DIRS} include
LIBRARIES ${PROJECT_NAME} ...
)
Which according to here should be enough: http://docs.ros.org/api/catkin/html/howto/format2/building_libraries.html
What am I missing to get the includes copied to have them included?
Full CMake files here: https://gitlab.com/korken89/cppViconStream/tree/master
Thanks for all help!
EDIT:
To give a better background to my problem, what problem I am having (and am trying to fix) is that the headers for my library are not found at compile time for the packages dependent on my library. And the catkin looks in the devel/lib/PKG
folder for the .so
file and the headers, but the headers are not there, hence the previous question.
Am I looking to this problem in the wrong way for using custom libraries as packages?
EDIT2:
As requested, the build logg. Hope it helps!
/home/emifre/Git/ros_ws/devel_ws/src/ros_viconstream/src/ros_viconstream_node.cpp:2:37: fatal error: viconstream/viconstream.h: No such file or directory
compilation terminated.
CMakeFiles/ros_viconstream_node.dir/build.make:62: recipe for target 'CMakeFiles/ros_viconstream_node.dir/src/ros_viconstream_node.cpp.o' failed
make[2]: *** [CMakeFiles/ros_viconstream_node.dir/src/ros_viconstream_node.cpp.o] Error 1
CMakeFiles/Makefile2:539: recipe for target 'CMakeFiles/ros_viconstream_node.dir/all' failed
make[1]: *** [CMakeFiles/ros_viconstream_node.dir/all] Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2
[ros_viconstream] <== '/home/emifre/Git/ros_ws/devel_ws/build/ros_viconstream/build_env.sh /usr/bin/make --jobserver-fds=3,6 -j' failed with return code '2'
Failed <== ros_viconstream [ 2.1 seconds ]
[build] There were '1' errors:
Failed to build package 'ros_viconstream' because the following command:
# Command to reproduce:
cd /home/emifre/Git/ros_ws/devel_ws/build/ros_viconstream && /home/emifre/Git/ros_ws/devel_ws/build/ros_viconstream/build_env.sh /usr/bin/make --jobserver-fds=3,6 -j; cd -
# Path to log:
cat /home/emifre/Git/ros_ws/devel_ws/build/build_logs/ros_viconstream.log
Exited with return code: 2
Originally posted by Korken89 on ROS Answers with karma: 15 on 2015-12-20
Post score: 1