-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathpremake5.lua
More file actions
89 lines (72 loc) · 1.64 KB
/
premake5.lua
File metadata and controls
89 lines (72 loc) · 1.64 KB
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
include("premake/utils")
SDK_PATH = os.getenv("HL2SDKCS2")
MM_PATH = os.getenv("MMSOURCE112")
if(SDK_PATH == nil) then
error("INVALID HL2SDK PATH")
end
if(MM_PATH == nil) then
error("INVALID METAMOD PATH")
end
workspace "StripperCS2"
configurations { "Debug", "Release" }
platforms {
"win64",
"linux64"
}
location "build"
project "StripperCS2"
kind "SharedLib"
language "C++"
targetdir "bin/%{cfg.buildcfg}"
location "build/StripperCS2"
visibility "Hidden"
targetprefix ""
files { "src/**.h", "src/**.cpp" }
vpaths {
["Headers/*"] = "src/**.h",
["Sources/*"] = "src/**.cpp"
}
filter "configurations:Debug"
defines { "DEBUG" }
symbols "On"
libdirs {
path.join("vendor", "funchook", "lib", "Debug"),
}
filter "configurations:Release"
defines { "NDEBUG" }
symbols "On"
optimize "On"
libdirs {
path.join("vendor", "funchook", "lib", "Release"),
}
filter "system:windows"
cppdialect "c++20"
include("premake/mm-windows.lua")
links { "psapi" }
staticruntime "On"
filter "system:linux"
defines { "stricmp=strcasecmp" }
cppdialect "c++2a"
include("premake/mm-linux.lua")
links { "pthread", "z"}
linkoptions { '-static-libstdc++', '-static-libgcc' }
disablewarnings { "register" }
filter {}
defines { "META_IS_SOURCE2", "PCRE2_CODE_UNIT_WIDTH=8", "PCRE2_STATIC" }
flags { "MultiProcessorCompile" }
pic "On"
links {
"funchook",
"distorm",
"pcre",
"spdlog"
}
includedirs {
path.join("vendor", "nlohmann"),
path.join("vendor", "funchook", "include"),
path.join("vendor", "spdlog", "include"),
path.join("vendor"),
path.join("src"),
}
include "vendor/pcre"
include "premake/spdlog"