-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathpremake5.lua
60 lines (54 loc) · 2.09 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
workspace "openspy-client"
configurations { "Release" }
platforms { "Win32", "x64" }
location "build"
objdir ("build/obj")
buildlog ("build/log/%{prj.name}.log")
characterset ("ASCII")
staticruntime "Off"
exceptionhandling "Off"
floatingpoint "Fast"
floatingpointexceptions "Off"
intrinsics "On"
rtti "Off"
flags { "NoBufferSecurityCheck", "NoIncrementalLink", "NoManifest", "NoPCH", "NoRuntimeChecks", "OmitDefaultLibrary" }
buildoptions { "/kernel", "/Gs1000000" }
linkoptions { "/kernel", "/SAFESEH:NO", "/GUARD:NO", "/EMITPOGOPHASEINFO", "/RELEASE", "/DEBUG:NONE", "/NOIMPLIB", "/NOEXP", "/IGNORE:4104" }
filter "configurations:Release"
runtime "Release"
defines "NDEBUG"
optimize "Speed"
symbols "Off"
filter "platforms:Win32"
architecture "x86"
filter "platforms:x64"
architecture "x64"
linkoptions { "/HIGHENTROPYVA:NO" }
project "openspy-client"
kind "SharedLib"
language "C"
targetextension ".dll"
targetdir "bin"
files { "dllmain.c", "include/*.h", "iathook/iathook.h" }
entrypoint "DllMain"
filter "platforms:Win32"
targetname "openspy.x86"
filter "platforms:x64"
targetname "openspy.x64"
if _ACTION and _ACTION >= "vs2010" then
require "vstudio"
premake.override(premake.vstudio.vc2010.elements, "clCompile", function(base, prj)
local calls = base(prj)
table.insert(calls, function() premake.vstudio.vc2010.element("SDLCheck", nil, "false") end)
table.insert(calls, function() premake.vstudio.vc2010.element("ControlFlowGuard", nil, "false") end)
return calls
end)
premake.override(premake.vstudio.vc2010.elements, "link", function(base, prj)
local calls = base(prj)
table.insert(calls, function() premake.vstudio.vc2010.element("SetChecksum", nil, "true") end)
table.insert(calls, function() premake.vstudio.vc2010.element("CETCompat", nil, "false") end)
table.insert(calls, function() premake.vstudio.vc2010.element("ImageHasSafeExceptionHandlers", nil, "false") end)
table.insert(calls, function() premake.vstudio.vc2010.element("EnableUAC", nil, "false") end)
return calls
end)
end