Conversation
There was a problem hiding this comment.
Code Review
This pull request updates the opengl package configuration on Linux to search for gl instead of libgl. A review comment points out that calling find_package("opengl") within the opengl package's own fetch logic is recursive and redundant, suggesting a more direct search for the standard system names gl and GL instead.
| if opt.system then | ||
| if package:is_plat("linux") and package.find_package then | ||
| return package:find_package("opengl", opt) or package:find_package("libgl", opt) | ||
| return package:find_package("opengl", opt) or package:find_package("gl", opt) |
There was a problem hiding this comment.
Calling package:find_package("opengl", opt) within the on_fetch implementation of the opengl package is recursive and will likely be caught by xmake's recursion protection, returning nil. This makes the first part of the check redundant. It is better to search directly for the standard system names. On Linux, "gl" is the standard name for pkg-config (gl.pc), and "GL" is the standard name for the library file (libGL.so).
return package:find_package("gl", opt) or package:find_package("GL", opt)
|
fetch-only package, tested on local Debian 13 |
No description provided.