Using catkin to install libraries
I currently have a series of 3rd party libraries that I want to package for easier building and use. The idea is that they are each contained in a catkin_project file that looks like this: (Note: libboost is just an example package)
CMakeFiles.txt
cmake_minimum_required( VERSION 2.8.3 )
project( lib_boost )
catkin_package()
install( DIRECTORY include/
DESTINATION ${CATKIN_GLOBAL_INCLUDE_DESTINATION}/${PROJECT_NAME} )
install( DIRECTORY lib/
DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}/${PROJECT_NAME} )
package.xml
<package format="2">
<name>lib_boost</name>
<version>1.0.0</version>
<description> -- </description>
<maintainer email="--"> -- </maintainer>
<license>--</license>
<buildtool_depend>catkin</buildtool_depend>
<export>
</export>
</package>
When I try to include this into the main system I do it in the following way: cmake_minimum_required( VERSION 2.8.3 )
project( project_ros CXX )
find_package( catkin REQUIRED COMPONENTS lib_boost
roscpp
std_msgs
sensor_msgs
message_runtime )
## Add all of the include directories defined by the packages listed above
include_directories( include ${catkin_INCLUDE_DIRS} )
catkin_package( CATKIN_DEPENDS message_runtime
lib_boost
INCLUDE_DIRS )
set( ROS_PROJECT_SOURCE
src/main.cpp )
## Create the linis_ros executable
add_executable( project_ros ${ROS_PROJECT_SOURCE} )
Package.xml
<?xml version="1.0"?>
<package format="2">
<name>project_ros</name>
<version>1.0.0</version>
<description>---</description>
<maintainer email="--">--</maintainer>
<license>--</license>
<buildtool_depend>catkin</buildtool_depend>
<build_depend>message_runtime</build_depend>
<build_depend>lib_boost</build_depend>
<exec_depend>message_runtime</exec_depend>
<exec_depend>lib_boost</exec_depend>
</package>
The output of both catkin_make -j1
and catkin_make install -j1
both throw the following error:
No such file or directory
When I look in the install directory there is nothing in the include portion but if i remove my package and then run catkin_make install
the libraries will put their files into the proper spots but when i replace my package and run catkin_make
it is still unable to find the header files I know are in the proper locations.