forked from 0x1F9F1/Open1560
-
Notifications
You must be signed in to change notification settings - Fork 0
/
premake5.lua
89 lines (63 loc) · 2.01 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
newoption {
trigger = "MM1_GAME_DIRECTORY",
description = "Path to MM1 Game Directory",
}
newoption {
trigger = "MM1_COMMAND_LINE",
description = "Command Line for MM1",
}
ROOT_DIR = os.getcwd()
local function read_file_line(file)
if not os.isfile(file) then
return nil
end
return io.lines(file)()
end
MM1_GAME_DIRECTORY = _OPTIONS['MM1_GAME_DIRECTORY'] or read_file_line('GameDirectory.txt')
MM1_COMMAND_LINE = _OPTIONS['MM1_COMMAND_LINE'] or read_file_line('CommandLine.txt')
workspace "Open1560"
location "build"
-- toolset "msc-ClangCL"
configurations { "Debug", "Release", "Final" }
platforms { "Win32" }
local build_number = os.getenv("GITHUB_RUN_NUMBER")
if build_number ~= nil then
local build_string = build_number
local build_commit = os.getenv("GITHUB_SHA")
if build_commit ~= nil then
build_string = build_string .. " / " .. build_commit
end
defines { "CI_BUILD_STRING=\"" .. build_string .. "\"" }
end
flags "MultiProcessorCompile"
editAndContinue "Off"
symbols "On"
-- debugformat "c7"
inlining "Auto"
intrinsics "On"
filter "kind:*App or SharedLib"
targetdir "bin/%{prj.name}/%{cfg.platform}_%{cfg.buildcfg}"
filter "configurations:Debug"
optimize "Debug"
defines { "_DEBUG", "ARTS_DEBUG" }
filter "configurations:Release"
optimize "On"
filter "configurations:Final"
optimize "Full"
defines { "NDEBUG", "ARTS_FINAL" }
flags { "LinkTimeOptimization", "NoIncrementalLink" }
functionlevellinking "On"
filter "platforms:Win32"
architecture "x86"
vectorextensions "SSE2"
-- filter "platforms:Win64"
-- architecture "x86_64"
filter "toolset:msc*"
buildoptions { "/permissive-", "/utf-8", "/Oy-" }
filter "toolset:msc-v*"
buildoptions { "/Zc:throwingNew" }
filter {}
group "Third Party"
include "vendor"
group ""
include "code"