-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpremake5.lua
143 lines (125 loc) · 2.93 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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
workspace "NewSphynx"
architecture "x86_64"
startproject "Sandbox"
configurations
{
"Debug", "Release"
}
startproject "Sandbox"
outputdir = "%{cfg.buildcfg}-%{cfg.system}-%{cfg.architecture}"
project "Sphynx"
location "Sphynx"
kind "StaticLib"
language "C++"
cppdialect "C++17"
staticruntime "off"
rtti "on"
characterset "unicode"
pchheader "pch.h"
pchsource "Sphynx\\src\\pch.cpp"
targetdir ("%{wks.location}\\build\\bin\\" .. outputdir .. "\\%{prj.name}")
objdir ("%{wks.location}\\build\\int\\" .. outputdir .. "\\%{prj.name}")
files
{
"Sphynx\\src\\**.h",
"Sphynx\\src\\**.cpp",
}
includedirs
{
"%{prj.name}\\dep\\spdlog\\include",
"%{prj.name}\\src\\Sphynx",
"%{prj.name}\\dep\\glfw\\include",
"%{prj.name}\\dep\\glad\\include",
"%{prj.name}\\dep\\imgui",
"%{prj.name}\\dep\\glm",
"%{prj.name}\\dep\\stb",
"%{prj.name}\\dep\\mono\\include",
}
links
{
"glfw",
"glad",
"imgui",
"opengl32.lib",
"%{wks.location}\\%{prj.name}\\dep\\mono\\lib\\libmono-static-sgen.lib",
}
defines{
-- "SPDLL"
}
filter "files:**.as"
buildaction "Copy"
-- filter "files:**.c":
-- compileas "C"
filter "configurations:Debug"
defines "DEBUG"
runtime "Debug"
symbols "on"
filter "configurations:Release"
defines "RELEASE"
runtime "Release"
optimize "off"
filter "system:windows"
systemversion "latest"
links{
"Ws2_32.lib",
"Winmm.lib",
"Version.lib",
"Bcrypt.lib"
}
filter{}
project "Sandbox"
location "Sandbox"
kind "ConsoleApp"
language "C++"
cppdialect "C++17"
staticruntime "off"
targetdir ("%{wks.location}\\build\\bin\\" .. outputdir .. "\\%{prj.name}")
objdir ("%{wks.location}\\build\\int\\" .. outputdir .. "\\%{prj.name}")
files
{
"Sandbox\\src\\**.h",
"Sandbox\\src\\**.cpp",
"Sandbox\\src\\**.lua"
}
includedirs
{
"%{wks.location}\\Sphynx\\dep\\spdlog\\include",
"%{wks.location}\\Sphynx\\dep\\glm",
"%{wks.location}\\Sphynx\\src\\Sphynx",
"%{wks.location}\\Sphynx\\src",
}
links
{
"Sphynx",
"ScriptAssembly",
"GameAssembly",
"%{wks.location}\\Sphynx\\dep\\mono\\lib\\libmono-static-sgen.lib",
}
copylocal{
"ScriptAssembly",
"GameAssembly"
}
filter "configurations:Debug"
defines "DEBUG"
runtime "Debug"
symbols "on"
filter "configurations:Release"
defines "RELEASE"
runtime "Release"
optimize "on"
filter "system:windows"
systemversion "latest"
links{
"Ws2_32.lib",
"Winmm.lib",
"Version.lib",
"Bcrypt.lib"
}
postbuildcommands { "xcopy \"%{wks.location}%{prj.name}\\data\" \"%{wks.location}\\build\\bin\\" .. outputdir .. "\\%{prj.name}\\data\" /e/i/s/y/h/k/c" }
filter { "not system:windows" }
postbuildcommands { "cp -f -r d%{wks.location}%{prj.name}\\data %{wks.location}\\build\\bin\\" .. outputdir .. "\\%{prj.name}\\data" }
include "ScriptAssembly/ScriptAssembly.lua"
include "GameAssembly/GameAssembly.lua"
include "Sphynx/dep/glfw"
include "Sphynx/dep/glad/glad"
include "Sphynx/dep/imgui"