I am experimenting with build options in exercise 2.4 in advanced C++ and noticed that the solution sets INCLUDE_DIRS to ‘include/${PROJECT_NAME}/’
In other examples, INCLUDE_DIRS to ‘include’
What does INCLUDE_DIRS set? - The only explanation I found was – INCLUDE_DIRS - The exported include paths (i.e. cflags) for the package – doesn’t clear things up.
Is include/ automatically appended to the project name making the full search path
my_package/include/
Are the following three statements doing the same thing?
catkin_package(
INCLUDE_DIRS include
)
include_directories(
include
)
set(INCLUDE_DIRS /path/to/include/dir)
dave
Edit: I searched for
include_directories vs catkin_package(INCLUDE_DIRS
in Google and Generative AI gave a good response. I think what was confusing me was that the catkin_package() macro is just syntactical sugar for preexisting functionality in CMake.
Edit2:
Something else that is pretty handy is to add messages to your cmake file with