-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathpremake5.lua
107 lines (88 loc) · 2.65 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
if os.ishost("windows") then
USE_IRRKLANG = true
BUILD_LUA = true
BUILD_EVENT = true
BUILD_FREETYPE = true
BUILD_IRRLICHT = true
BUILD_SQLITE = true
else
USE_IRRKLANG = true
BUILD_LUA = true
BUILD_EVENT = false --not implemented on linux
BUILD_FREETYPE = false
BUILD_IRRLICHT = not os.ishost("macosx")
BUILD_SQLITE = false
end
workspace "YGOPro"
location "build"
language "C++"
objdir "obj"
configurations { "Release", "Debug" }
filter "system:windows"
defines { "WIN32", "_WIN32", "WINVER=0x0501" }
entrypoint "mainCRTStartup"
systemversion "latest"
startproject "ygopro"
filter "action:vs2015"
toolset "v140_xp"
filter "action:vs2017"
toolset "v141_xp"
filter "action:vs2019"
toolset "v141_xp"
filter "system:bsd"
includedirs { "/usr/local/include" }
libdirs { "/usr/local/lib" }
filter "system:macosx"
includedirs { "/usr/local/include/freetype2" }
libdirs { "/usr/local/lib" }
buildoptions { "-stdlib=libc++" }
links { "OpenGL.framework", "Cocoa.framework", "IOKit.framework" }
filter "system:linux"
buildoptions { "-U_FORTIFY_SOURCE" }
filter "configurations:Release"
optimize "Speed"
targetdir "bin/release"
filter "configurations:Debug"
symbols "On"
defines "_DEBUG"
targetdir "bin/debug"
filter { "configurations:Release", "action:vs*" }
flags { "LinkTimeOptimization" }
staticruntime "On"
disablewarnings { "4244", "4267", "4305", "4838", "4577", "4819", "4018", "4996", "4477", "4091", "4828", "4800" }
filter { "configurations:Release", "not action:vs*" }
symbols "On"
defines "NDEBUG"
buildoptions "-march=native"
filter { "configurations:Debug", "action:vs*" }
defines { "_ITERATOR_DEBUG_LEVEL=0" }
disablewarnings { "4819", "4828" }
filter "action:vs*"
vectorextensions "SSE2"
buildoptions { "/utf-8" }
defines { "_CRT_SECURE_NO_WARNINGS" }
filter "not action:vs*"
buildoptions { "-fno-strict-aliasing", "-Wno-multichar" }
filter {"not action:vs*", "system:windows"}
buildoptions { "-static-libgcc" }
filter {}
include "ocgcore"
include "gframe"
if BUILD_LUA then
include "lua"
end
if BUILD_EVENT then
include "event"
end
if BUILD_FREETYPE then
include "freetype"
end
if BUILD_IRRLICHT then
include "irrlicht"
end
if BUILD_SQLITE then
include "sqlite3"
end
if USE_IRRKLANG then
include "ikpmp3"
end