nigels-com / glew

The OpenGL Extension Wrangler Library
Other
2.61k stars 610 forks source link

'pkg-config --libs glew' returns unnecessary flags: -lX11 -lGLU -lGL #301

Open yurivict opened 3 years ago

yurivict commented 3 years ago
$ pkg-config --libs glew
-L/usr/local/lib -lGLEW -lX11 -lGLU -lGL 

It should only return -L/usr/local/lib -lGLEW. More flags are returned when the --static argument is given.

Redundant link flags cause ports depending on GLEW also add redundant dependencies, because this is based on what libraries binaries are link with.

Micket commented 3 years ago

Unless I am mistaken, for the actual link steps when building glew it's just visualinfo that requires -lGL at all (so there is also some needless linking going on for libGLEW and glewinfo that would be appropriate to remove)