-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpremake5.lua
87 lines (66 loc) · 1.83 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
newoption
{
trigger = "opengl43",
description = "use OpenGL 4.3"
}
workspace "GameEngine"
configurations { "Debug","Debug.DLL", "Release", "Release.DLL" }
platforms { "x64", "x86"}
filter "configurations:Debug"
defines { "DEBUG" }
symbols "On"
filter "configurations:Debug.DLL"
defines { "DEBUG" }
symbols "On"
filter "configurations:Release"
defines { "NDEBUG" }
optimize "On"
filter "configurations:Release.DLL"
defines { "NDEBUG" }
optimize "On"
filter { "platforms:x64" }
architecture "x86_64"
filter { "platforms:x86" }
architecture "x86"
filter{}
location "build"
include "dependencies/raylib"
project "Game"
kind "ConsoleApp"
location "%{_MAIN_SCRIPT_DIR}/build/%{prj.name}"
language "C++"
cppdialect "C++17"
targetdir "%{_MAIN_SCRIPT_DIR}/build/bin/%{cfg.buildcfg}"
objdir "%{_MAIN_SCRIPT_DIR}/build/bin-int/%{cfg.buildcfg}"
debugdir "%{_MAIN_SCRIPT_DIR}/"
files {"src/**.c", "src/**.cpp", "src/**.h"}
links {"raylib"}
includedirs
{
"src",
"dependencies/raylib/src",
"dependencies/enet/include",
"dependencies/cppack/msgpack/include",
}
defines{"PLATFORM_DESKTOP"}
if (_OPTIONS["opengl43"]) then
defines{"GRAPHICS_API_OPENGL_43"}
else
defines{"GRAPHICS_API_OPENGL_33"}
end
filter "action:vs*"
defines{"_WINSOCK_DEPRECATED_NO_WARNINGS", "_CRT_SECURE_NO_WARNINGS", "_WIN32"}
dependson {"raylib"}
links {"raylib.lib"}
characterset ("MBCS")
filter "system:windows"
defines{"_WIN32"}
links {"winmm", "kernel32", "opengl32", "kernel32", "gdi32"}
libdirs {"%{_MAIN_SCRIPT_DIR}/build/bin/%{cfg.buildcfg}"}
filter "system:linux"
links {"pthread", "GL", "m", "dl", "rt", "X11"}
filter {}
postbuildcommands{
-- Assets
"{COPYDIR} %{_MAIN_SCRIPT_DIR}/assets/ %{_MAIN_SCRIPT_DIR}/build/bin/%{cfg.buildcfg}/assets/",
}