-
Notifications
You must be signed in to change notification settings - Fork 2
/
premake5.lua
66 lines (49 loc) · 1.46 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
workspace "SilentPatchME"
platforms { "Win32" }
project "SilentPatchME"
kind "SharedLib"
targetextension ".dll"
language "C++"
targetname "d3dx9_31"
include "source/VersionInfo.lua"
-- Include DX SDK in include paths
includedirs { "$(DXSDK_DIR)/Include" }
workspace "*"
configurations { "Debug", "Release", "Master" }
location "build"
vpaths { ["Headers/*"] = "source/**.h",
["Sources/*"] = { "source/**.c", "source/**.cpp" },
["Resources"] = "source/**.rc"
}
files { "source/*.h", "source/*.cpp", "source/resources/*.rc", "source/*.def" }
-- Disable exceptions in WIL
defines { "WIL_SUPPRESS_EXCEPTIONS" }
cppdialect "C++17"
staticruntime "on"
buildoptions { "/sdl" }
warnings "Extra"
-- Automated defines for resources
defines { "rsc_Extension=\"%{prj.targetextension}\"",
"rsc_Name=\"%{prj.name}\"" }
filter "configurations:Debug"
defines { "DEBUG" }
runtime "Debug"
filter "configurations:Master"
defines { "NDEBUG" }
symbols "Off"
filter "configurations:not Debug"
optimize "Speed"
functionlevellinking "on"
flags { "LinkTimeOptimization" }
filter { "platforms:Win32" }
system "Windows"
architecture "x86"
filter { "platforms:Win64" }
system "Windows"
architecture "x86_64"
filter { "toolset:*_xp"}
defines { "WINVER=0x0501", "_WIN32_WINNT=0x0501" } -- Target WinXP
buildoptions { "/Zc:threadSafeInit-" }
filter { "toolset:not *_xp"}
defines { "WINVER=0x0601", "_WIN32_WINNT=0x0601" } -- Target Win7
buildoptions { "/permissive-" }