-
Notifications
You must be signed in to change notification settings - Fork 0
/
xmake.lua
73 lines (53 loc) · 1.75 KB
/
xmake.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
add_rules("mode.debug", "mode.release")
add_requires("glfw", "glad", "glm")
add_includedirs(".")
-- common config
rule("opengles_config")
on_load(function (target)
if is_plat("android") then
target:add("links", "GLESv2", "EGL")
elseif is_plat("ios") then
target:add("frameworks", "OpenGLES", "QuartzCore")
elseif is_plat("linux") then
target:add("links", "GLESv2", "EGL")
elseif is_plat("windows") then
target:add("links", "libGLESv2", "libEGL")
elseif is_plat("macosx") then
-- target:add("frameworks", "OpenGL")
else
target:add("links", "GLESv2", "EGL")
end
target:add("packages", "egl-header")
-- if not is_plat("android") and not is_plat("ios") then
-- target:add("packages", "glfw")
-- end
-- target:add("packages", "glm")
end)
-- gli-opengl lib
target("gli-opengl")
set_kind("shared")
add_files("backends/gli_opengl.cpp")
add_packages("glad", "glm")
add_packages("opengl")
target("gli-opengl.static")
set_kind("static")
add_files("backends/gli_opengl.cpp")
add_packages("glad", "glm")
add_packages("opengl")
-- gli-opengles lib
-- sudo apt install libgles2-mesa-dev libegl1-mesa-dev
target("gli-opengles")
set_kind("shared")
add_files("backends/gli_opengles.cpp")
add_packages("glm")
add_rules("opengles_config")
target("gli-opengles.static")
set_kind("static")
add_files("backends/gli_opengles.cpp")
add_packages("glm")
add_rules("opengles_config")
-- gli-opengl-examples
includes("examples/xmake.lua")
-- gli demos
includes("demos/xmake.lua")
-- TODO: rust-ffi bindgen --with-derive-default --output tmp.rs gl_interface.h