forked from raylib-extras/RPGExample
-
Notifications
You must be signed in to change notification settings - Fork 0
/
premake5.lua
104 lines (81 loc) · 2.35 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
newoption
{
trigger = "opengl43",
description = "use OpenGL 4.3"
}
workspace "RPGExample"
configurations { "Debug","Debug.DLL", "Release", "Release.DLL" }
platforms { "x64"}
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"
targetdir "bin/%{cfg.buildcfg}/"
defines{"PLATFORM_DESKTOP"}
if (_OPTIONS["opengl43"]) then
defines{"GRAPHICS_API_OPENGL_43"}
else
defines{"GRAPHICS_API_OPENGL_33"}
end
project "raylib"
filter "configurations:Debug.DLL OR Release.DLL"
kind "SharedLib"
defines {"BUILD_LIBTYPE_SHARED"}
filter "configurations:Debug OR Release"
kind "StaticLib"
filter "action:vs*"
defines{"_WINSOCK_DEPRECATED_NO_WARNINGS", "_CRT_SECURE_NO_WARNINGS"}
characterset ("MBCS")
filter "system:windows"
defines{"_WIN32"}
links {"winmm", "kernel32", "opengl32", "kernel32", "gdi32"}
filter "system:linux"
links {"pthread", "GL", "m", "dl", "rt", "X11"}
filter{}
location "build"
language "C++"
targetdir "bin/%{cfg.buildcfg}"
cppdialect "C++17"
includedirs { "raylib/src", "raylib/src/external/glfw/include"}
vpaths
{
["Header Files"] = { "raylib/src/**.h"},
["Source Files/*"] = {"raylib/src/**.c"},
}
files {"raylib/src/*.h", "raylib/src/*.c"}
project "RPGExample"
kind "ConsoleApp"
location "RPG"
language "C++"
targetdir "bin/%{cfg.buildcfg}"
cppdialect "C++17"
vpaths
{
["Header Files"] = { "**.h", "**.hpp"},
["Source Files"] = {"**.c", "**.cpp"},
}
files {"RPG/**.c", "RPG/**.cpp", "RPG/**.h", "RPG/PUGIXML/*.hpp", "RPG/PUGIXML/*.cpp"}
links {"raylib"}
includedirs { "RPG", "RPG/include", "raylib/src" }
defines{"PLATFORM_DESKTOP", "GRAPHICS_API_OPENGL_33"}
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 {"bin/%{cfg.buildcfg}"}
filter "system:linux"
links {"pthread", "GL", "m", "dl", "rt", "X11"}