Including generated headers from devel/include space
Hello,
I have a package, let's call it gen. It is built under catkin kinetic and I can see the gen.h in workspace/devel/include.
In another package, let's call it toCompile. The code is unable to find gen.h
workspace/src/toCompile/include/toCompile/source_toCompile.h:23:27: fatal error: "gen/gen.h": No such file or directory
I have tried to apply a previous question A but I don't understand what should be inside foo.h.in. It still can't find the header.
Also tried to add (include ${CATKIN_DEVEL_PREFIX}/include)
but it makes no difference.
cmake_minimum_required(VERSION 2.8.3)
project(mav_planning_utils)
find_package(catkin REQUIRED COMPONENTS roscpp gen)
include_directories(include ${Eigen_INCLUDE_DIRS} ${catkin_INCLUDE_DIRS})
include_directories(include ${CATKIN_DEVEL_PREFIX}/include)
catkin_package(
CATKIN_DEPENDS roscpp gen
INCLUDE_DIRS include ${Eigen_INCLUDE_DIRS}
LIBRARIES yaml-cpp ${PROJECT_NAME} ${PROJECT_NAME}_timing ${PROJECT_NAME}_rpoly
CFG_EXTRAS export_flags.cmake
)
add_subdirectory(src/library)
add_subdirectory(src/test)
add_subdirectory(src/nodes)
The export_flags just has SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
I assuming the headers are already in the correct place (devel/include) it's just a question of pointing catkin in the right direction. Also, this worked fine in indigo and broke in kinetic.
Thank you for any help!
How did you get your gen.h installed to workspace/devel/include? All of the examples I could find don't actually copy the headers there -- I can still compile fine, but I'd like to have all the headers in a central place for ease of use in my IDE
I ended up not using the code I was trouble with so no idea, sorry.