osgearth
osgearth copied to clipboard
3.2: doesn't build with GLEW on modern CMake in CONFIG mode
It is not possible to build osgEarth with GLEW without such hacks:
https://github.com/microsoft/vcpkg/pull/ 7967
Because new FindGLEW CMake use "imported targets" like "GLEW::glew": https://cmake.org/cmake/help/latest/module/FindGLEW.html
The following lines are the problem:
https://github.com/gwaldron/osgearth/blob/master/CMakeModules/OsgEarthMacroUtils.cmake#L428 https://github.com/gwaldron/osgearth/blob/master/CMakeModules/OsgEarthMacroUtils.cmake#L435
Not everyone use vcpkg (with such hacks).
glbinding PR ( https://github.com/gwaldron/osgearth/pull/1693 ) works on windows and MacOS.
GLEW is found in CONFIG mode:
https://github.com/Kitware/CMake/blob/master/Modules/FindGLEW.cmake#L67
Then, CMake has no "GLEW_INCLUDE_DIRS" and "GLEW_LIBRARIES" defined.
vcpkg do a lot of patches for such issues: https://github.com/microsoft/vcpkg/blob/master/ports/osgearth/fix-dependencies.patch