robotology / ycm-cmake-modules

YCM (YCM CMake modules) is a collection of various useful CMake modules.
http://robotology.github.io/ycm-cmake-modules
Other
50 stars 22 forks source link

Fix Findassimp.cmake in Ubuntu 20.04 and 18.04 #373

Closed traversaro closed 3 years ago

traversaro commented 3 years ago

Unfortunately what discussed in https://github.com/robotology/ycm/pull/371#issuecomment-780720827 turned out to be true.

In particular, if I understood correctly (still needs to be confirmed) @randaz81 is having problem in https://github.com/robotology/cer due to the specific order of find_package(YCM) and find_package(gazebo) calls (gazebo's CMake config file calls DART's CMake config file that calls find_package(assimp) , whose behavior change depending of weather find_package(YCM) was called or not). While this could be probably fixed by moving find_package(gazebo) before find_package(YCM), this PR should provide a more robust fix by having a logic to detect the malformed assimp configuration file of Ubuntu 20.04 and fixing it.

cc @randaz81 if you could test this it would be great.

drdanz commented 3 years ago

@traversaro I think this should be on the ycm-0.12 branch, though

randaz81 commented 3 years ago

Unfortunately, the PR seems not to be enough to fix my issue. BTW, I'm not using Ubuntu 20.04, I am working on a docker image nvidia/cuda:10.0-cudnn7-devel which is based on Ubuntu 18.04

traversaro commented 3 years ago

@traversaro I think this should be on the ycm-0.12 branch, though

Yes, the branch was already based on that, it was just the PR that was wrong, I fixed it now.

traversaro commented 3 years ago

Unfortunately, the PR seems not to be enough to fix my issue. BTW, I'm not using Ubuntu 20.04, I am working on a docker image nvidia/cuda:10.0-cudnn7-devel which is based on Ubuntu 18.04

Based on https://github.com/robotology/ycm/issues/224#issue-421512576 I added another fix for another affected library. Anyhow, probably we need to make sure that this was working before PR https://github.com/robotology/ycm/pull/371#issuecomment-780720827, otherwise probably the source of the problem is another.

randaz81 commented 3 years ago

I can confirm that the new commit fixes the issues 👍

drdanz commented 3 years ago

Merged, thanks.