FindOpenGL fails to find the library and include directory on MSYS2
I was trying to compile OpenSceneGraph from git on MSYS2 with CMake 3.18.4. CMake warned that "CMake no longer defines WIN32 on MSYS!". After that it failed to find OpenGL
—both the library and include directory. The FindOpenGL.cmake
module, however, does contain the necessary branch, which can work if it ever executes. But since it begins with if (WIN32)
, and CMake doesn't define it WIN32
, this branch doesn't execute: the module continues as if we were on Linux.
Edited by Brad King