-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathPremake5.lua
128 lines (113 loc) · 2.76 KB
/
Premake5.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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
enginedir = "%{wks.location}/../Source/Engine"
function enginepath(path)
return enginedir .. "/" .. path
end
editordir = "%{wks.location}/../Source/Editor"
function editorpath(path)
return editordir .. "/" .. path
end
examplesdir = "%{wks.location}/../Examples"
function examplespath(path)
return examplesdir .. "/" .. path
end
thirdpartydir = "%{wks.location}/../ThirdParty"
function thirdpartypath(path)
return thirdpartydir .. "/" .. path
end
plugindir = "%{wks.location}/../Plugins"
function pluginpath(path)
return plugindir .. "/" .. path
end
function sourcedirs(dirs)
if type(dirs) ~= "table" then dirs = {dirs} end
for _, dir in ipairs(dirs) do
files {
dir .. "/**.h",
dir .. "/**.c",
dir .. "/**.hpp",
dir .. "/**.cpp",
dir .. "/**.cppm",
dir .. "/**.inl",
dir .. "/**.hsf",
}
end
end
function plugin(name)
project(name)
kind "SharedLib"
language "C++"
cppdialect "C++20"
location "%{wks.location}/Plugins/%{prj.name}"
targetdir "%{wks.location}/Bin/%{cfg.buildcfg}"
dependson {
"Engine",
}
sourcedirs {
"Plugins/" .. name
}
end
workspace "Horizon"
location "Build"
configurations {
"Debug",
"Release",
}
flags {
"MultiProcessorCompile",
}
startproject "EditorLauncher"
filter { 'files:**.cppm' }
buildaction 'ClCompile'
filter "configurations:Debug"
defines {
"HE_CONFIG_DEBUG",
"DEBUG",
"_DEBUG",
}
symbols "On"
filter "configurations:Release"
defines {
"HE_CONFIG_RELEASE",
"NDEBUG",
"_ITERATOR_DEBUG_LEVEL=0",
}
optimize "On"
filter "system:windows"
platforms "Win64"
systemversion "latest"
filter "platforms:Win64"
defines {
"HE_PLATFORM_WINDOWS",
"_CRT_SECURE_NO_WARNINGS",
"_SILENCE_CXX23_ALIGNED_STORAGE_DEPRECATION_WARNING",
--"DEBUG_ONLY_RAY_TRACING_ENBALE=1",
"USE_OPTICK=0",
"HE_DISABLE_MODULE=0",
}
staticruntime "On"
architecture "x64"
buildoptions {
"/wd5105",
"/utf-8",
}
linkoptions {
"/ignore:4006",
}
disablewarnings {
}
group "Source"
include "Source/Engine"
include "Source/Editor"
include "Source/EditorLauncher"
group ""
group "ThirdParty"
include "ThirdParty/yaml-cpp"
group ""
group "Examples"
include "Examples/ExampleBase"
include "Examples/CaptureFrames"
include "Examples/ModelViewer"
include "Examples/PathTracing"
include "Examples/RigidBody"
include "Examples/MusicPlayer"
group ""