osgearth icon indicating copy to clipboard operation
osgearth copied to clipboard

3.2: doesn't build with GLEW on modern CMake in CONFIG mode

Open remoe opened this issue 3 years ago • 2 comments

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.

remoe avatar Jun 15 '21 17:06 remoe

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.

remoe avatar Jun 17 '21 07:06 remoe

vcpkg do a lot of patches for such issues: https://github.com/microsoft/vcpkg/blob/master/ports/osgearth/fix-dependencies.patch

remoe avatar Jun 22 '21 16:06 remoe