diff --git a/packages/g/glshaderpp/xmake.lua b/packages/g/glshaderpp/xmake.lua new file mode 100644 index 000000000..8c3a3e8f8 --- /dev/null +++ b/packages/g/glshaderpp/xmake.lua @@ -0,0 +1,30 @@ +package("glshaderpp") + set_kind("library", {headeronly = true}) + set_homepage("https://gitlab-lepuy.iut.uca.fr/opengl/glshaderpp") + set_description("A lightweight header-only library to compile and link OpenGL GLSL shaders.") + set_license("LGPL-3.0-or-later") + + add_urls("https://gitlab-lepuy.iut.uca.fr/opengl/glshaderpp/-/archive/$(version)/glshaderpp-$(version).tar.bz2", + "https://gitlab-lepuy.iut.uca.fr/opengl/glshaderpp.git") + + add_versions("v1.0.0", "81b47b90e90d8be19d0421d67f4fc735d74d285a5f516b99ee7dc49d7933ecf6") + + add_deps("glew") + + on_install("linux", "macosx", "mingw", "windows", function (package) + os.cp("GLShaderPP/public/GLShaderPP", package:installdir("include")) + end) + + on_test(function (package) + assert(package:check_cxxsnippets({test = [[ + #include + #include + #include + #include + + void test() { + GLShaderPP::CShaderException e("If you read this, GLShaderPP is happy :)", + GLShaderPP::CShaderException::ExceptionType::LinkError); + } + ]]}, {configs = {languages = "c++17"}})) + end)