-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathxmake.lua
More file actions
84 lines (69 loc) · 2.14 KB
/
Copy pathxmake.lua
File metadata and controls
84 lines (69 loc) · 2.14 KB
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
74
75
76
77
78
79
80
81
82
83
84
set_project("bloom")
set_version("1.0.7")
if is_plat("windows") then
add_cxflags("/utf-8")
end
add_rules("mode.debug", "mode.release")
option("opengl")
set_default(true)
set_showmenu(true)
set_description("Build OpenGL rendering backend")
option_end()
option("d3d11")
set_default(true)
set_showmenu(true)
set_description("Build Direct3D 11 backend")
option_end()
option("shared")
set_default(false)
set_showmenu(true)
set_description("Build bloom as a shared library")
option_end()
option("examples")
set_default(true)
set_showmenu(true)
set_description("Build showcase/example programs")
option_end()
target("bloom")
set_kind(has_config("shared") and "shared" or "static")
set_languages("c11")
add_includedirs(".", { public = true })
add_files("core/api.c")
add_files("core/**/*.c")
add_files("widgets/**/*.c")
add_files("platform/win32/*.c")
if has_config("opengl") then
add_defines("BLOOM_OPENGL_BACKEND", { public = true })
add_files("rendering/opengl/*.c")
end
if has_config("d3d11") then
add_defines("BLOOM_D3D11_BACKEND", { public = true })
add_files("rendering/d3d11/*.c")
add_syslinks("d3d11", "dxgi", "d3dcompiler")
end
add_headerfiles("bloom.h")
add_headerfiles("(core/**.h)")
add_headerfiles("(widgets/**.h)")
add_headerfiles("(rendering/**.h)")
add_headerfiles("(platform/**.h)")
add_syslinks("opengl32", "user32", "gdi32", "dwmapi", "shell32")
if has_config("examples") then
if has_config("opengl") then
target("example_widgets_opengl")
set_kind("binary")
set_languages("c11")
add_deps("bloom")
add_includedirs(".")
add_defines("BLOOM_OPENGL_BACKEND")
add_files("examples/widgets_showcase/main.c")
end
if has_config("d3d11") then
target("example_widgets_d3d11")
set_kind("binary")
set_languages("c11")
add_deps("bloom")
add_includedirs(".")
add_defines("BLOOM_D3D11_BACKEND")
add_files("examples/widgets_showcase/main.c")
end
end