Included dependencies break on CMake 4.0+
Author: csparker247Created Aug 26, 2025Updated Aug 29, 2025
As of CMake 4.0, compatibility with versions of CMake older than 3.5 is removed [link]. I found out the hard way that many of this project's included dependencies and third_party sources still use old versions for cmake_minimum_required, thus breaking OpenMVG builds on CMake 4.0+. While there is a workaround, it seems like a good time to update/fix these dependencies.
I'll slowly work through identifying what and how each can be updated. Thus far, I've identified that the following projects have issues (possibly more to come):
dependencies/osi_clp- Seems to just require an updatedcmake_minimum_requiredcall, but maybe we want to update the source code at the same time?third_party/lemon- Seems like an updatecmake_minimum_requiredis all that's needed, and there's not really new code upstream.third_party/ceres-solver- The latest version of Ceres is 2.2.0, which requires CMake 3.16+, so it avoids this issue. However, there have been many changes to the existing Ceres source inside OpenMVG to make it play nicely with the OpenMVG build system. I've attempted to update to v2.2.0 and patch these changes back in, but not sure if I'm missing anything.rerun- Rerun is actually okay, but the internalarrowlibrary has the CMake error, even in the newest versions.
Source: openMVG/openMVG