2
0

xmake.lua 693 B

123456789101112131415161718
  1. package("opengl")
  2. set_homepage("https://opengl.org/")
  3. set_description("OpenGL - The Industry Standard for High Performance Graphics")
  4. on_fetch(function (package, opt)
  5. -- we always get it from compiler toolchain
  6. if package:is_plat("macosx") then
  7. return {frameworks = "OpenGL", defines = "GL_SILENCE_DEPRECATION"}
  8. elseif package:is_plat("windows", "mingw") then
  9. return {links = "opengl32"}
  10. end
  11. if opt.system then
  12. if package:is_plat("linux") and package.find_package then
  13. return package:find_package("opengl", opt) or package:find_package("libgl", opt)
  14. end
  15. end
  16. end)