Skip to content

Allow new glog in SFM CMake Project #3296

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

Merged
merged 3 commits into from
Jun 30, 2022
Merged

Allow new glog in SFM CMake Project #3296

merged 3 commits into from
Jun 30, 2022

Conversation

gvcallen
Copy link
Contributor

@gvcallen gvcallen commented Jun 30, 2022

The latest version of glog provides native CMake support, meaning that find_package(glog) can be used without hassle. The Ceres project supports this. However, if Ceres finds the new glog, it sets variables glog_FOUND and not Glog_FOUND, which the CMakeLists.txt of the SFM module checks for. The assumption that glog has not been found then leads to errors later on, as valid variables are replaced with NOT-FOUND in the following search scripts.

This PR adds support for the new glog by simply checking for both Glog_FOUND AND glog_FOUND. While there may be more sophisticated ways to solve this (e.g. I would recommend updating FindGlog.cmake to the newest version included in Ceres) this seemed to be the minimal effort solution which worked for me, at least as a temporary fix before newer CMake find scripts are added.

force_builders=linux,docs

Copy link
Member

@alalek alalek left a comment

Choose a reason for hiding this comment

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

Thank you for contribution!

@alalek alalek merged commit 9d0a451 into opencv:4.x Jun 30, 2022
hakaboom pushed a commit to hakaboom/opencv_contrib that referenced this pull request Jul 1, 2022
Allow new glog in SFM CMake Project

* Allow new glog in SFM CMakeLists.txt

* Fix typo

* Fixed missing bracket
@alalek alalek mentioned this pull request Aug 21, 2022
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.

2 participants