xmake.lua 622 B

1234567891011121314151617181920
  1. package("glut")
  2. set_kind("library", {headeronly = true})
  3. set_homepage("https://www.opengl.org/resources/libraries/glut/")
  4. set_description("OpenGL utility toolkit")
  5. if not is_plat("macosx") then
  6. add_deps("freeglut")
  7. end
  8. on_fetch(function (package, opt)
  9. if opt.system then
  10. if package:is_plat("macosx") then
  11. return {frameworks = {"GLUT", "OpenGL"}, defines = "GL_SILENCE_DEPRECATION"}
  12. end
  13. end
  14. end)
  15. on_install("windows", "mingw", "macosx", "linux", function (package)
  16. -- do nothing, only to keep dep available
  17. end)