-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathxmake.lua
68 lines (61 loc) · 2.27 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
--
-- > Notice: Amélie Heinrich @ 2024
-- > Create Time: 2024-12-03 05:17:30
--
includes("ThirdParty")
add_rules("mode.debug", "mode.release", "mode.releasedbg")
target("Beached")
set_rundir(".")
set_languages("c++20")
set_encodings("utf-8")
-- set_policy("build.sanitizer.address", true)
if is_plat("windows") then
add_syslinks("user32",
"gdi32",
"kernel32",
"d3d12",
"dxgi",
"ThirdParty/DXC/lib/dxcompiler.lib",
"ThirdParty/nvtt/lib64/nvtt30205.lib",
"ThirdParty/PIX/lib/WinPixEventRuntime.lib")
end
if is_mode("debug") then
set_symbols("debug")
set_optimize("none")
add_defines("BEACHED_DEBUG")
end
if is_mode("release") then
set_symbols("hidden")
set_optimize("fastest")
set_strip("all")
end
if is_mode("releasedbg") then
set_symbols("debug")
set_optimize("fastest")
set_strip("all")
end
-- Copy DLLs in build folder
before_link(function (target)
if not os.exists("$(buildir)/$(plat)/$(arch)/$(mode)/Assets/") then
os.mkdir("$(buildir)/$(plat)/$(arch)/$(mode)/Assets/")
end
if not os.exists("$(buildir)/$(plat)/$(arch)/$(mode)/.cache/") then
os.mkdir("$(buildir)/$(plat)/$(arch)/$(mode)/.cache/")
end
os.cp("Binaries/*", "$(buildir)/$(plat)/$(arch)/$(mode)/")
os.cp("Assets/*", "$(buildir)/$(plat)/$(arch)/$(mode)/Assets/")
os.cp(".cache/*", "$(buildir)/$(plat)/$(arch)/$(mode)/.cache/")
end)
add_files("Source/**.cpp")
add_includedirs("Source",
"ThirdParty/",
"ThirdParty/spdlog/include",
"ThirdParty/DirectX/include",
"ThirdParty/imgui",
"ThirdParty/imgui/backends",
"ThirdParty/DXC/Include",
"ThirdParty/glm",
"ThirdParty/nvtt/",
"ThirdParty/PIX/include")
add_deps("spdlog", "ImGui", "STB", "CGLTF")
add_defines("GLM_ENABLE_EXPERIMENTAL", "USE_PIX", "GLM_FORCE_DEPTH_ZERO_TO_ONE")