-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathgenie.lua
88 lines (77 loc) · 1.86 KB
/
genie.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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
newoption {
trigger = "dx12",
description = "use dx12 backend"
}
newoption {
trigger = "fsr2",
description = "use fsr2"
}
newoption {
trigger = "nodx",
description = "do not use any dx backend"
}
local function setLibDirs()
libdirs { "external/lib/win64_" .. binary_api_dir .. "/release"}
libdirs { "external/pix/bin/x64" }
end
local use_fsr2 = false
if _OPTIONS["fsr2"] then
if not _OPTIONS["dx12"] then
printf("--fsr2 used, but not --dx12. FSR2 is only available on DX12");
else
use_fsr2 = true
end
end
if _OPTIONS["nodx"] == nil then
if use_fsr2 then
project "fsr2"
libType()
files {
"src/fsr2.cpp",
"src/fsr2.h",
}
if build_studio then
files { "src/editor/fsr2_plugins.cpp" }
end
links { "engine" }
includedirs { "external/include/fsr2" }
useLua()
defaultConfigurations()
linkPlugin("fsr2")
end
project "renderer"
files {
"src/**.c",
"src/**.cpp",
"src/**.h",
"genie.lua"
}
removefiles { "src/fsr2.h", "src/fsr2.cpp", "src/editor/fsr2_plugins.cpp" }
excludes { "../../src/renderer/gpu/gpu_gl.cpp" }
if _OPTIONS["dx12"] then
includedirs {"external/pix/Include/WinPixEventRuntime", "external/include/dx" }
files { "external/pix/bin/x64/WinPixEventRuntime.dll" }
copy { "external/pix/bin/x64/WinPixEventRuntime.dll" }
excludes { "src/gpu_dx.cpp" }
solution "LumixEngine"
defines { "LUMIX_DX12" }
else
excludes { "src/gpu_dx12.cpp" }
solution "LumixEngine"
defines { "LUMIX_DX11" }
end
if _OPTIONS["dynamic-plugins"] then
libdirs { "external/lib/win64_" .. binary_api_dir .. "/release" }
configuration {"vs*"}
links { "dxguid" }
configuration {}
end
if build_studio then
project "studio"
setLibDirs()
end
if build_app then
project "app"
setLibDirs()
end
end