Skip to content
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

Also set lowercase octomap_* variables in CMake config #369

Merged
merged 1 commit into from
May 11, 2022

Conversation

wxmerkt
Copy link
Member

@wxmerkt wxmerkt commented May 9, 2022

Relates to #138

We have seen issues where OctoMap did not get configured properly due to common use of find_package(octomap REQUIRED) in downstream packages (i.e. lower-case octomap). This issue has become more common on ROS2 and previously was circumvented by a patch to change the LIBDIR. Defining both variables grandfathers in downstream users (including using ament-auto-configure) by also providing the required configuration variables with a lower-case as in the project name.

@ahornung
Copy link
Member

Thanks! I'm just wondering, is this the correct "CMake way" to solve the problem? Looks a bit arcane to me to simply define both cases, instead of fixing the depending packages?

(Ping @mwoehlke-kitware)

@mwoehlke-kitware
Copy link

I'd say it's probably fine either way. This would hardly be the first package to do such a thing. OTOH, I think it's okay if you want to insist downstream users fix themselves.

@wxmerkt
Copy link
Member Author

wxmerkt commented May 10, 2022

I think part of the problem is that the project name and config file name is lower-cased, but the defined variables are upper-case. ament in ROS2 [as one case I know of] can find based on the XML (if I understand this correctly); and there a <depend>octomap</depend> would call the octomap-config.cmake but the set variables are upper-cased so not used

@ahornung
Copy link
Member

@mwoehlke-kitware @wxmerkt thanks for the clarification, makes sense!

@ahornung ahornung merged commit d1662aa into OctoMap:devel May 11, 2022
@ahornung
Copy link
Member

@wxmerkt I just released this fix with v1.9.8 in the repo, in case you want to update the ROS release as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants