-
Notifications
You must be signed in to change notification settings - Fork 0
/
xmake.lua
53 lines (50 loc) · 1.57 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
set_xmakever("2.7.9")
set_version("1.0.0")
add_rules("mode.release", "mode.debug")
set_toolchains("msvc")
set_languages("c99", "cxx17")
set_exceptions("none")
set_encodings("utf-8")
rule("dx_lib")
on_load(function (target)
target:add("syslinks","d3d11","dxgi","dxguid","D3DCompiler","winmm","kernel32","user32","gdi32","winspool","shell32","ole32","oleaut32","uuid","comdlg32","advapi32")
bin_path = path.join(os.projectdir(),"bin")
end)
rule_end()
rule("imguiini")
after_build(function ()
imguiini_file=path.join(os.projectdir(),"imgui.ini")
bin_path = path.join(os.projectdir(),"bin")
if not os.isdir(bin_path) then
os.mkdir(bin_path)
end
if os.isfile(imguiini_file) then
os.mv(imguiini_file,bin_path)
end
end)
rule_end()
if is_arch("x64", "x86_64", "arm64") then
-- disable ccache in-case error
set_policy("build.ccache", true)
includes("xmake_func.lua")
includes("thirdparty")
target("FluidSimulation-Engine")
add_rules("imguiini")
add_rules("hlsl_shader_complier")
-- set bin dir
set_targetdir("bin")
_config_project({
project_kind = "binary",
enable_exception = true,
--batch_size=8
})
add_deps("imgui")
add_rules("dx_lib")
add_includedirs("include")
add_headerfiles("include/**.h")
add_files("src/**.cpp")
--shader
add_headerfiles("shaders/**.hlsl|shaders/**.hlsli")
add_files("shaders/**.hlsl|shaders/**.hlsli")
target_end()
end