mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-03 20:29:56 -06:00
Create OpenGL::GL and OpenGL::GLU imported targets using the locations found. This feature was originally added by commit v3.1.0-rc1~420^2~2 (FindOpenGL: Provide imported targets for GL and GLU, 2014-05-31) but had to be reverted by commit v3.1.0-rc3~10^2 (FindOpenGL: Revert support for imported targets, 2014-12-01) due to issue #15267. Since then we added support for `IMPORTED_LIBNAME` to interface libraries, so use it to handle the case where we have only the library name without an absolute path. Inspired-by: Philipp Möller <bootsarehax@googlemail.com> Closes: #15267
18 lines
280 B
C
18 lines
280 B
C
#ifdef _WIN32
|
|
#include <windows.h>
|
|
#endif
|
|
#ifdef __APPLE__
|
|
#include <OpenGL/gl.h>
|
|
#else
|
|
#include <GL/gl.h>
|
|
#endif
|
|
|
|
#include <stdio.h>
|
|
|
|
int main()
|
|
{
|
|
/* Reference a GL symbol without requiring a context at runtime. */
|
|
printf("&glGetString = %p\n", &glGetString);
|
|
return 0;
|
|
}
|