OpenSceneGraph
OpenSceneGraph copied to clipboard
CMake Minimum Required Warning
When doing a find_package()
to locate OSG, CMake gives off the following warning:
CMake Deprecation Warning at extern/lib64/cmake/OpenSceneGraph/OpenSceneGraphConfig.cmake:58 (cmake_minimum_required):
Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.
Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.
CMake Version:
$ cmake --version
cmake version 3.20.2
CMake suite maintained and supported by Kitware (kitware.com/cmake).
OSG Version: master
It looks like the version here needs a simple bump: https://github.com/openscenegraph/OpenSceneGraph/blob/master/packaging/cmake/OpenSceneGraphConfig.cmake.in#L58
cmake seems to have added an option in v3.12 to express the fact that the cmake files have been tested and found working with a more recent version: doc-link This suggests that the correct solution would be: cmake_minimum_required(VERSION 2.8.8...3.15.5 FATAL_ERROR) This should still work with 2.8.8 while fixing the depreciation warning. Can you check if this actually works for you? Laurens.
@LaurensVoerman Yes, that change does fix the warning i'm seeing.
@LaurensVoerman i have updated my PR to reflect that change