Skip to content

Commit 5564911

Browse files
micro-gl: add package (#2544)
1 parent 199d474 commit 5564911

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

packages/m/micro-gl/xmake.lua

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
package("micro-gl")
2+
set_kind("library", {headeronly = true})
3+
set_homepage("http://micro-gl.github.io/docs/microgl")
4+
set_description("Realtime, Embeddable, Modular, Headers Only C++11 CPU vector graphics. no STD lib, no FPU and no GPU required !")
5+
6+
add_urls("https://github.com/micro-gl/micro-gl.git")
7+
add_versions("2023.08.30", "1cc67998795a810ca721b09815cc18e29f9f291f")
8+
9+
add_deps("cmake")
10+
11+
on_install(function (package)
12+
io.replace("CMakeLists.txt", "add_subdirectory(examples)", "", {plain = true})
13+
import("package.tools.cmake").install(package)
14+
end)
15+
16+
on_test(function (package)
17+
assert(package:check_cxxsnippets({test = [[
18+
#include <microgl/color.h>
19+
using RGB_5650 = microgl::rgba_t<5,6,5,0>;
20+
void test() {
21+
auto r_bits = RGB_5650::r;
22+
auto g_bits = RGB_5650::g;
23+
auto b_bits = RGB_5650::b;
24+
}
25+
]]}, {configs = {languages = "c++11"}}))
26+
end)

0 commit comments

Comments
 (0)