diff options
author | Sergeanur <s.anureev@yandex.ua> | 2021-01-12 11:45:56 +0100 |
---|---|---|
committer | Sergeanur <s.anureev@yandex.ua> | 2021-01-12 11:55:07 +0100 |
commit | cb4b4d584c4d08791207ff92870b400a84faa742 (patch) | |
tree | fc740c000f1283fb695de5556cdd59efcf71e65b /premake5.lua | |
parent | Merge branch 'lcs-dev' into lcs (diff) | |
parent | premake: add startrpoject; add lto option; fix copying of binary to gamedir; update premake5.exe (diff) | |
download | re3-cb4b4d584c4d08791207ff92870b400a84faa742.tar re3-cb4b4d584c4d08791207ff92870b400a84faa742.tar.gz re3-cb4b4d584c4d08791207ff92870b400a84faa742.tar.bz2 re3-cb4b4d584c4d08791207ff92870b400a84faa742.tar.lz re3-cb4b4d584c4d08791207ff92870b400a84faa742.tar.xz re3-cb4b4d584c4d08791207ff92870b400a84faa742.tar.zst re3-cb4b4d584c4d08791207ff92870b400a84faa742.zip |
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 7634ccdf..6c26732c 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 "reLCS" language "C++" configurations { "Debug", "Release" } + startproject "reLCS" location "build" symbols "Full" staticruntime "off" @@ -109,7 +115,10 @@ workspace "reLCS" 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 "reLCS" 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 |