forked from ladislav-zezula/StormLib
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Premake5.lua
132 lines (102 loc) · 3.04 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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
solution 'StormLib'
location 'build'
language 'C++'
configurations { 'Debug', 'Release', }
platforms { 'x32', 'x64' }
targetdir 'bin'
objdir 'bin'
files {
'src/**.h',
'src/**.c',
'src/**.cpp',
'doc/*.txt',
}
removefiles {
'src/adpcm/*_old.*',
'src/huffman/*_old.*',
'src/huffman/huff_patch.*',
'src/pklib/crc32.c',
'src/zlib/compress.c',
}
filter 'configurations:Debug*'
flags { 'Symbols' }
defines { '_DEBUG' }
optimize 'Debug'
filter 'configurations:Release*'
defines { 'NDEBUG' }
optimize 'Full'
filter 'system:windows'
links { 'wininet', }
defines { 'WINDOWS', '_WINDOWS' }
filter { 'system:windows', 'platforms:x32' }
defines { 'WIN32', '_WIN32' }
filter { 'system:windows', 'platforms:x64' }
defines { 'WIN64', '_WIN64' }
filter 'system:linux'
defines { '_7ZIP_ST', 'BZ_STRICT_ANSI' }
removefiles {
'src/lzma/C/LzFindMt.*',
'src/lzma/C/Threads.*',
}
--------------------------------------------------------------------------------
project 'StormLib'
kind 'StaticLib'
removefiles 'src/SBaseDumpData.cpp'
configurations {
'DebugAD', -- Debug Ansi Dynamic
'DebugAS', -- Debug Ansi Static
'DebugUD', -- Debug Unicode Dynamic
'DebugUS', -- Debug Unicode Static
'ReleaseAD', -- Release Ansi Dynamic
'ReleaseAS', -- Release Ansi Static
'ReleaseUD', -- Release Unicode Dynamic'
'ReleaseUS', -- Release Unicode Static
}
configmap {
['Debug'] = 'DebugUS',
['Release'] = 'ReleaseUS',
}
filter 'configurations:*S'
flags { 'StaticRuntime' }
filter { 'configurations:*U*', 'action:vs*' }
flags { 'Unicode' }
filter { 'configurations:*U*', 'not action:vs*' }
defines { 'UNICODE', '_UNICODE' }
filter 'DebugAD'
targetsuffix 'DAD'
filter 'ReleaseAD'
targetsuffix 'RAD'
filter 'DebugAS'
targetsuffix 'DAS'
filter 'ReleaseAS'
targetsuffix 'RAS'
filter 'DebugUD'
targetsuffix 'DUD'
filter 'ReleaseUD'
targetsuffix 'RUD'
filter 'DebugUS'
targetsuffix 'DUS'
filter 'ReleaseUS'
targetsuffix 'RUS'
--------------------------------------------------------------------------------
project 'StormLib_dll'
kind 'SharedLib'
targetname 'Stormlib'
files {
'stormlib_dll/DllMain.c',
'stormlib_dll/StormLib.def',
}
removefiles 'src/SBaseDumpData.cpp'
filter { 'system:windows', 'action:gmake' }
linkoptions {
'-Xlinker --enable-stdcall-fixup',
'../stormlib_dll/StormLib.def',
}
filter 'Debug'
targetsuffix '_d'
--------------------------------------------------------------------------------
project 'StormLib_test'
kind 'ConsoleApp'
files {
'test/StormTest.cpp',
}