xmake.lua 1.3 KB

123456789101112131415161718192021222324252627282930
  1. package("glshaderpp")
  2. set_kind("library", {headeronly = true})
  3. set_homepage("https://gitlab-lepuy.iut.uca.fr/opengl/glshaderpp")
  4. set_description("A lightweight header-only library to compile and link OpenGL GLSL shaders.")
  5. set_license("LGPL-3.0-or-later")
  6. add_urls("https://gitlab-lepuy.iut.uca.fr/opengl/glshaderpp/-/archive/$(version)/glshaderpp-$(version).tar.bz2",
  7. "https://gitlab-lepuy.iut.uca.fr/opengl/glshaderpp.git")
  8. add_versions("v1.0.0", "81b47b90e90d8be19d0421d67f4fc735d74d285a5f516b99ee7dc49d7933ecf6")
  9. add_deps("glew")
  10. on_install("linux", "macosx", "mingw", "windows", function (package)
  11. os.cp("GLShaderPP/public/GLShaderPP", package:installdir("include"))
  12. end)
  13. on_test(function (package)
  14. assert(package:check_cxxsnippets({test = [[
  15. #include <GL/glew.h>
  16. #include <GLShaderPP/Shader.h>
  17. #include <GLShaderPP/ShaderException.h>
  18. #include <GLShaderPP/ShaderProgram.h>
  19. void test() {
  20. GLShaderPP::CShaderException e("If you read this, GLShaderPP is happy :)",
  21. GLShaderPP::CShaderException::ExceptionType::LinkError);
  22. }
  23. ]]}, {configs = {languages = "c++17"}}))
  24. end)