ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
The easiest way is to have the package export your include directory as Gary mentioned. The install() call is not really necessary.
You should create a folder named include/ < name of package > / where you put all the header files (*.hpp) of the package.
Then the package that exports the library should have the following in the CMakeLists to be able to export the header files:
catkin_package(
LIBRARIES visionutil rosutil
INCLUDE_DIRS include)
include_directories(
include
${catkin_INCLUDE_DIRS})
Then the other package should then be able to see the header files as (you might have to run catkin_make or cmake first):
#include <name_of_package/header_file.h>
In your case:
#include <proj_util/rosutil.hpp>
2 | No.2 Revision |
The easiest way is to have the package export your its include directory as Gary mentioned. The install() call is not really necessary.
You should create a folder named include/ < name of package > / (include/proj_utils in your case) where you put all the header files (*.hpp) of the package.
Then the package that exports the library should have the following in the CMakeLists to be able to export the header files:
catkin_package(
LIBRARIES visionutil rosutil
INCLUDE_DIRS include)
include_directories(
include
${catkin_INCLUDE_DIRS})
Then the other package should then be able to see the header files as (you might have to run catkin_make or cmake first):
#include <name_of_package/header_file.h>
In your case:
#include <proj_util/rosutil.hpp>