-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathxmake.lua
58 lines (51 loc) · 1.89 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
set_project("MeowEngine")
set_languages("c++20")
-- 设置全局的第三方库路径
src_dir = os.projectdir() .. "/src"
code_generator_dir = os.projectdir() .."/src/code_generator"
runtime_dir = os.projectdir() .. "/src/meow_runtime"
editor_dir = os.projectdir() .. "/src/meow_editor"
rule("EditorDebug", function()
after_load(function(target)
if is_mode("EditorDebug") then
if not target:get("symbols") then
target:set("symbols", "debug")
target:set("strip", "debug")
end
if not target:get("optimize") then
target:set("optimize", "none")
end
target:set("targetdir", "build/EditorDebug")
target:set("defines", { "MEOW_EDITOR", "MEOW_DEBUG" })
end
end)
end)
rule("EditorRelease", function()
after_load(function(target)
if is_mode("EditorRelease") then
if not target:get("symbols") and target:targetkind() ~= "shared" then
target:set("symbols", "hidden")
end
if not target:get("optimize") then
if is_plat("android", "iphoneos") then
target:set("optimize", "smallest")
else
target:set("optimize", "fastest")
end
end
if not target:get("strip") then
target:set("strip", "all")
end
target:set("targetdir", "build/EditorRelease")
target:set("defines", { "MEOW_EDITOR" })
end
end)
end)
add_rules("EditorDebug", "EditorRelease")
add_requires("vulkansdk")
-- add_requires("llvm") llvm isn't supported well now, so hard code dependency on env
add_requires("glm", "glfw", "volk", "spirv-cross", "stb", "assimp")
add_requires("imgui docking", {configs = {glfw = true, vulkan = true}})
includes(code_generator_dir)
includes(runtime_dir)
includes(editor_dir)