header files not found even though they should be installed
I created a package A which only contains a header file to use in some other packages. But when trying to use the header in project B I always get the error "File not found". I found some questions here addressing the problem as "install issue". But I have the installation in my CMakeLists.txt of package A.
I also included ${CATKIN_INCLUDE_DIRS} in project B, but it still does not find the header file.
CMakeLists.txt of A:
cmake_minimum_required(VERSION 2.8.3)
project(A)
## Find catkin macros and libraries
## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz)
## is used, also find other catkin packages
find_package(catkin REQUIRED COMPONENTS
geometry_msgs
ndt_map
roscpp
rospy
std_msgs
)
###########
## Build ##
###########
## Specify additional locations of header files
## Your package locations should be listed before other locations
# include_directories(include)
include_directories(
${catkin_INCLUDE_DIRS}
include
)
#############
## Install ##
#############
## Mark cpp header files for installation
install(DIRECTORY include/${PROJECT_NAME}/
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
FILES_MATCHING PATTERN "*.h"
PATTERN ".svn" EXCLUDE
)
important part of CMakeLists.txt of project B:
find_package( catkin REQUIRED COMPONENTS
A
)
include_directories(
include
${catkin_INCLUDE_DIRS}
)