premake: add startrpoject; add lto option; fix copying of binary to gamedir; update premake5.exe

# Conflicts:
#	premake5.lua
This commit is contained in:
withmorten 2021-01-10 20:31:26 +01:00 committed by Sergeanur
parent 7e888a6379
commit 75367e714a
3 changed files with 11 additions and 2 deletions

Binary file not shown.

View File

@ -34,6 +34,11 @@ newoption {
description = "Build with opus"
}
newoption {
trigger = "lto",
description = "Use link time optimization"
}
if(_OPTIONS["with-librw"]) then
Librw = "vendor/librw"
else
@ -61,6 +66,7 @@ end
workspace "reVC"
language "C++"
configurations { "Debug", "Release" }
startproject "reVC"
location "build"
symbols "Full"
staticruntime "off"
@ -109,7 +115,10 @@ workspace "reVC"
filter "configurations:Release"
defines { "NDEBUG" }
optimize "On"
optimize "Speed"
if(_OPTIONS["lto"]) then
flags { "LinkTimeOptimization" }
end
filter { "platforms:win*" }
system "windows"
@ -167,7 +176,7 @@ workspace "reVC"
scriptspath = scriptspath or ""
if (gamepath) then
postbuildcommands {
'{COPY} "%{cfg.buildtarget.abspath}" "' .. gamepath .. scriptspath .. '%{cfg.buildtarget.name}"'
'{COPYFILE} "%{cfg.buildtarget.abspath}" "' .. gamepath .. scriptspath .. '%{cfg.buildtarget.name}"'
}
debugdir (gamepath)
if (exepath) then

Binary file not shown.