-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathpremake5.lua
82 lines (60 loc) · 1.76 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
newoption {
trigger = "with-tests",
description = "Include the tests project"
}
workspace "TRAE-menu-hook"
architecture "x86"
configurations { "Debug", "Release" }
platforms { "TR7", "TRAE", "TR8" }
-- Main project
project "TRAE-menu-hook"
kind "SharedLib"
targetextension ".asi"
language "C++"
cppdialect "C++17"
links { "d3d9.lib", "Comctl32.lib" }
-- Source files
files "src/**"
includedirs { "src" }
-- Vendor files
dofile "vendor.lua"
defines { "IMGUI_IMPL_WIN32_DISABLE_GAMEPAD" }
-- Build configurations
symbols "On"
linkoptions [["/manifestdependency:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'"]]
filter "configurations:Debug"
defines { "DEBUG", "_DEBUG" }
filter "configurations:Release"
defines { "NDEBUG" }
optimize "On"
-- Game configurations
filter "platforms:TR7"
defines { "TR7" }
targetname "TR7-Menu-Hook"
filter "platforms:TRAE"
defines { "TRAE" }
targetname "TRAE-Menu-Hook"
filter "platforms:TR8"
defines { "TR8", "BATCH_DRAW_CALLS" }
targetname "TR8-Menu-Hook"
-- Tests
if _OPTIONS["with-tests"] then
project "Tests"
kind "ConsoleApp"
language "C++"
cppdialect "C++17"
files {
"tests/**",
"src/**",
"vendor/catch2/extras/catch_amalgamated.cpp"
}
includedirs { "src", "vendor/catch2/extras" }
dofile "vendor.lua"
filter "configurations:Debug"
defines { "DEBUG", "_DEBUG" }
filter "configurations:Release"
defines { "NDEBUG" }
optimize "On"
-- Define this as dummy game
defines { "TR7" }
end