diff options
author | withmorten <morten.with@gmail.com> | 2021-01-10 20:31:26 +0100 |
---|---|---|
committer | Sergeanur <s.anureev@yandex.ua> | 2021-01-12 12:43:42 +0200 |
commit | 75367e714adf33dd5d0e046f86917ef8994c6c54 (patch) | |
tree | d1b57103ddb47984fc73d7af7440d45601b43398 /premake5.lua | |
parent | 7e888a6379247d1c0be055eb27626c9bb53590d2 (diff) |
premake: add startrpoject; add lto option; fix copying of binary to gamedir; update premake5.exe
# Conflicts:
# premake5.lua
Diffstat (limited to 'premake5.lua')
-rw-r--r-- | premake5.lua | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/premake5.lua b/premake5.lua index 9796b8a9..e62ad6be 100644 --- a/premake5.lua +++ b/premake5.lua @@ -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 |