FindOpenGL: need name-only imported targets on Windows
This issue was created automatically from an original Mantis Issue. Further discussion may take place here.
On window the OpenGL libraries are linked by library name rather than filename. For visual studio OPENGL_gl_LIBRARY
is for example set to opengl32
.
The IMPORTED_LOCATION
of the imported target OpenGL::GL
target is also set to opengl32
. Since IMPORTED_LOCATION
is expected to be a path this fails with e.g. ninja at build time with:
ninja: error: 'opengl32', needed by 'bin\foobar.dll', missing and no known rule to make it