diff options
author | withmorten <morten.with@gmail.com> | 2021-01-10 20:31:26 +0100 |
---|---|---|
committer | withmorten <morten.with@gmail.com> | 2021-01-10 20:55:40 +0100 |
commit | 59825a526851715c5593312a5432b7de007241a7 (patch) | |
tree | 865838607e98f1b66571454e90a699c4b35fc75b /premake5.lua | |
parent | update librw (diff) | |
download | re3-59825a526851715c5593312a5432b7de007241a7.tar re3-59825a526851715c5593312a5432b7de007241a7.tar.gz re3-59825a526851715c5593312a5432b7de007241a7.tar.bz2 re3-59825a526851715c5593312a5432b7de007241a7.tar.lz re3-59825a526851715c5593312a5432b7de007241a7.tar.xz re3-59825a526851715c5593312a5432b7de007241a7.tar.zst re3-59825a526851715c5593312a5432b7de007241a7.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 e6f34c9f..0d77ae2c 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 "re3"
language "C++"
configurations { "Debug", "Release" }
+ startproject "re3"
location "build"
symbols "Full"
staticruntime "off"
@@ -109,7 +115,10 @@ workspace "re3" filter "configurations:Release"
defines { "NDEBUG" }
- optimize "On"
+ optimize "Speed"
+ if(_OPTIONS["lto"]) then
+ flags { "LinkTimeOptimization" }
+ end
filter { "platforms:win*" }
system "windows"
@@ -166,7 +175,7 @@ workspace "re3" 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
|