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

Add pcl version check for letting users know the version issue #39

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

LimHyungTae
Copy link

Hi Koide, this is Hyungtae.

I added a version check line, so if a user turns on the PCL option (i.e., set BUILD_WITH_PCL ON), CMakeLists.txt automatically checks the PCL version and then rejects the build once the satisfaction of the PCL dependency does not meet as follows:

image

Please check it.

Cheers!

@LimHyungTae
Copy link
Author

If your desktop has PCL 1.11.0, then please test it whether it works or not.

Comment on lines 58 to +61
find_package(PCL REQUIRED)
if(PCL_VERSION VERSION_LESS "1.11.0")
message(FATAL_ERROR "The found PCL version ${PCL_VERSION} is too low. Required is at least 1.11.0")
endif()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can be simplified to just

Suggested change
find_package(PCL REQUIRED)
if(PCL_VERSION VERSION_LESS "1.11.0")
message(FATAL_ERROR "The found PCL version ${PCL_VERSION} is too low. Required is at least 1.11.0")
endif()
find_package(PCL 1.11.0 REQUIRED)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So nice, @valgur, but if so, what if one uses PCL 1.12. or more higher version?
Plus, it's my personal question, but I'm curious whether it is possible to install multiple PCL versions on a machine. Thx!

Copy link
Owner

@koide3 koide3 Apr 28, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@LimHyungTae
Thanks for your contribution. The way suggested by @valgur only specifies the minimum required version and should accept newer versions.

Possibly you can switch different PCL versions with some cmake arguments. But, I'm not very familiar with the way handling multiple versions of a library in cmake.

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

Successfully merging this pull request may close these issues.

3 participants