-
Notifications
You must be signed in to change notification settings - Fork 280
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DEPENDS in catkin_package() not adding package INCLUDE_DIRS #552
Comments
Since catkin has no way of guessing the case (and should not just try to use all possible cases). It uses the name exactly as passed to In this case where the package defines all uppercase variable you need to pass an all uppercase package name to |
That is exactly correct, if the package does not follow the convention where In times like this you must manually pass include directories and libraries to the catkin_export call, and you cannot depend on the For the documentation, I think it is already ticked here: #491 |
Port active trajectory checks and subscriber shutdown logic into FinishTrajectory(), so that a trajectory can be cleanly finished by function call.
... or more accurately, not adding
PACKAGE_INCLUDE_DIRS
(note the uppercase).This issue was triggered in
gazebo_ros_control
.In the CMakeLists.txt, we can see something similar to the following:
What catkin does when we specify this is to add
${gazebo_INCLUDE_DIRS}
toPROJECT_CMAKE_CONFIG_INCLUDE_DIRS
, which is ultimately appended tocatkin_INCLUDE_DIRS
of whatever projects that usesfind_package(catkin COMPONENTS gazebo_ros_control)
A quick glance inside of gazebo-config.cmake reveals that the variable that is set is
GAZEBO_INCLUDE_DIRS
(note the uppercase), which is what is recommended in the CMake tutorials.The result is that if package
foo
usesfind_package(catkin COMPONENTS gazebo_ros_control)
will not have gazebo include dirs in itscatkin_INCLUDE_DIRS
, and will result in a build fail at first, and then in a declaration of an unnecessary dependency offoo
to gazebo.Another workaround is to change the CMakeLists.txt in gazebo_ros_control to the following:
I don't know exactly what should be done here. If I understand the problem correctly, catkin has no way to guess the case of the XY_INCLUDE_DIRS variables, and assumes that the case is the same as that of the package name. Also, I could not find a mention of this case subtlety anywhere in the doc, and thought that it would be at least worth mentioning.
The text was updated successfully, but these errors were encountered: