-
Notifications
You must be signed in to change notification settings - Fork 7
/
premake5.lua
67 lines (50 loc) · 1.63 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
workspace "DXHRDC-GFX"
platforms { "Win32" }
project "DXHRDC-GFX"
kind "SharedLib"
targetextension ".asi"
language "C++"
include "source/VersionInfo.lua"
files { "**/MemoryMgr.h", "**/Patterns.*", "**/HookInit.hpp" }
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/wil/*", "source/*.def",
"source/effects/*", "source/imgui/*" }
-- Disable exceptions in WIL
defines { "WIL_SUPPRESS_EXCEPTIONS" }
-- Disable linking XInput in Dear ImGui and IME functions
defines { "IMGUI_IMPL_WIN32_DISABLE_GAMEPAD", "IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCTIONS" }
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-" }