forked from sumatrapdfreader/sumatrapdf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpremake4.lua
124 lines (112 loc) · 3.47 KB
/
premake4.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
-- to generate Visual Studio files in vs-premake directory, run:
-- premake4 vs2010 or premake4 vs2008
-- common settings for solutions
function solution_common()
configurations { "Debug", "Release" }
location "vs-premake" -- this is where generated solution/project files go
-- Symbols - generate .pdb files
-- StaticRuntime - statically link crt
-- ExtraWarnings - set max compiler warnings level
-- FatalWarnings - compiler warnigs are errors'
-- NoMinimalRebuild - disable /Gm because it clashes with /MP
flags {
"Symbols", "StaticRuntime", "ExtraWarnings", "FatalWarnings",
"NoRTTI", "Unicode", "NoExceptions", "NoMinimalRebuild"
}
configuration "Debug"
targetdir "obj-dbg" -- this is where the .exe/.lib etc. files wil end up
defines { "_DEBUG", "DEBUG" }
configuration "Release"
targetdir "obj-rel"
flags { "Optimize" }
defines { "NDEBUG" }
-- 4189 - variable not used, happens with CrashIf() macros that are no-op
-- in release builds
buildoptions { "/wd4189" }
configuration {"vs*"}
defines { "_WIN32", "WIN32", "WINDOWS" }
-- 4800 - int -> bool coversion
-- 4100 - unreferenced formal parameter
-- 4428 - universal-character-name encountered in source
buildoptions {
"/wd4800", "/wd4127", "/wd4100", "/wd4244", "/wd4428"
}
end
solution "efi"
solution_common()
project "efi"
kind "ConsoleApp"
language "C++"
files {
"tools/efi/*.h",
"tools/efi/*.cpp",
"src/utils/BaseUtil*",
"src/utils/BitManip.h",
"src/utils/Dict*",
"src/utils/StrUtil*",
}
includedirs { "src/utils" }
links { }
--configuration {"vs*"}
-- Note: don't understand why this is needed
--linkoptions {"/NODEFAULTLIB:\"msvcrt.lib\""}
--[[
project "utils"
kind "StaticLib"
language "C++"
files { "src/utils/*.cpp", "src/utils/*.h" }
excludes
{
"src/utils/*_ut.cpp",
"src/utils/Zip*",
"src/utils/HtmlWindow*",
"src/utils/LzmaSimpleArchive*",
"src/utils/Experiments*",
"src/utils/UtilTests.cpp",
"src/utils/Touch*",
}
includedirs { "src/utils" }
--]]
solution "all_tests"
solution_common()
project "test_util"
kind "ConsoleApp"
language "C++"
files {
"src/utils/BaseUtil*",
"src/utils/BitManip*",
"src/utils/ByteOrderDecoder*",
"src/utils/CmdLineParser*",
"src/utils/CryptoUtil*",
"src/utils/CssParser*",
"src/utils/Dict*",
"src/utils/DebugLog*",
"src/utils/FileUtil*",
"src/utils/GeomUtil.*",
"src/utils/HtmlParserLookup*",
"src/utils/HtmlPrettyPrint*",
"src/utils/HtmlPullParser*",
"src/utils/JsonParser*",
"src/utils/Scoped.*",
"src/utils/SettingsUtil*",
"src/utils/SimpleLog*",
"src/utils/StrFormat*",
"src/utils/StrUtil*",
"src/utils/SquareTreeParser*",
"src/utils/TrivialHtmlParser*",
"src/utils/UtAssert*",
"src/utils/VarintGob*",
"src/utils/Vec.*",
"src/utils/WinUtil*",
"src/utils/tests/*",
--"src/AppTools.*",
--"src/ParseCommandLine.*",
--"src/StressTesting.*",
"src/AppUtil*",
"src/UnitTests.cpp",
"src/mui/SvgPath*",
"src/tools/test_util.cpp"
}
defines { "NO_LIBMUPDF" }
includedirs { "src/utils" }
links { "gdiplus", "comctl32", "shlwapi", "Version" }