OpenSceneGraph icon indicating copy to clipboard operation
OpenSceneGraph copied to clipboard

CMake Minimum Required Warning

Open nmaludy opened this issue 2 years ago • 3 comments

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

nmaludy avatar Apr 13 '22 12:04 nmaludy

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 avatar Jun 23 '22 14:06 LaurensVoerman

@LaurensVoerman Yes, that change does fix the warning i'm seeing.

nmaludy avatar Jun 30 '22 18:06 nmaludy

@LaurensVoerman i have updated my PR to reflect that change

nmaludy avatar Jul 01 '22 01:07 nmaludy