ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A answers.ros.org

# catkin_make --install headers search order

Hi, Let's say I have 2 packages A & B of which package B use some of the package A headers.

I use catkin_make_isolated --install  to build my packages. Package A is builded first, then its headers is installed to install_isolated directory using:

install(DIRECTORY include/${PROJECT_NAME} DESTINATION${CMAKE_INSTALL_PREFIX}/include)

The headers is then visible for package B to use and the compilation runs just fine.

The problem is that each time I modified headers file of package A, its source file looks for the headers file in install_isolated directory but not the ones in include/{package A} of source directory. The only solution I have in mind is delete the install_isolated/{package A}/include directory and recompile, but it is very inconvenient, not portable and not standalone runnable.

Is there a way to force source files to look for headers in its source location but not in install space, but using always catkin_make_isolated --install  ?

edit retag close merge delete

Sort by » oldest newest most voted

I assume after building the first time you have sourced the setup file in the same shell and later try to build a second time from within the same shell?

Please try to use a separate shell for sourcing the setup. Then rebuilding the workspace in the first shell (which has not sourced the setup of that workspace) should work fine.

more