summaryrefslogtreecommitdiffstats
path: root/premake5.lua
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2021-02-16 17:08:19 +0100
committerSergeanur <s.anureev@yandex.ua>2021-02-16 17:08:19 +0100
commite38467ef3affef25b83daf0c0c3b8a61f04e8a65 (patch)
tree3628aed1314f21147e7a46f3095fa341088d8044 /premake5.lua
parentfix mailbox particle (diff)
parentPR rules (diff)
downloadre3-e38467ef3affef25b83daf0c0c3b8a61f04e8a65.tar
re3-e38467ef3affef25b83daf0c0c3b8a61f04e8a65.tar.gz
re3-e38467ef3affef25b83daf0c0c3b8a61f04e8a65.tar.bz2
re3-e38467ef3affef25b83daf0c0c3b8a61f04e8a65.tar.lz
re3-e38467ef3affef25b83daf0c0c3b8a61f04e8a65.tar.xz
re3-e38467ef3affef25b83daf0c0c3b8a61f04e8a65.tar.zst
re3-e38467ef3affef25b83daf0c0c3b8a61f04e8a65.zip
Diffstat (limited to 'premake5.lua')
-rw-r--r--premake5.lua19
1 files changed, 16 insertions, 3 deletions
diff --git a/premake5.lua b/premake5.lua
index 010810a0..afee03a1 100644
--- a/premake5.lua
+++ b/premake5.lua
@@ -65,7 +65,7 @@ end
workspace "reLCS"
language "C++"
- configurations { "Debug", "Release" }
+ configurations { "Debug", "Release", "Vanilla" }
startproject "reLCS"
location "build"
symbols "Full"
@@ -120,13 +120,16 @@ workspace "reLCS"
filter "configurations:Debug"
defines { "DEBUG" }
- filter "configurations:Release"
+ filter "configurations:not Debug"
defines { "NDEBUG" }
optimize "Speed"
if(_OPTIONS["lto"]) then
flags { "LinkTimeOptimization" }
end
+ filter "configurations:Vanilla"
+ defines { "VANILLA_DEFINES" }
+
filter { "platforms:win*" }
system "windows"
@@ -208,6 +211,7 @@ project "librw"
architecture "amd64"
filter "platforms:win*"
+ defines { "_CRT_SECURE_NO_WARNINGS", "_CRT_NONSTDC_NO_DEPRECATE" }
staticruntime "on"
buildoptions { "/Zc:sizedDealloc-" }
@@ -239,6 +243,10 @@ project "reLCS"
targetname "reLCS"
targetdir "bin/%{cfg.platform}/%{cfg.buildcfg}"
+ if(_OPTIONS["with-librw"]) then
+ dependson "librw"
+ end
+
files { addSrcFiles("src") }
files { addSrcFiles("src/animation") }
files { addSrcFiles("src/audio") }
@@ -264,6 +272,7 @@ project "reLCS"
files { addSrcFiles("src/vehicles") }
files { addSrcFiles("src/weapons") }
files { addSrcFiles("src/extras") }
+ files { "src/extras/GitSHA1.cpp" } -- this won't be in repo in first build
includedirs { "src" }
includedirs { "src/animation" }
@@ -316,7 +325,7 @@ project "reLCS"
filter {}
if(os.getenv("GTA_LCS_RE_DIR")) then
- setpaths("$(GTA_LCS_RE_DIR)/", "%(cfg.buildtarget.name)")
+ setpaths(os.getenv("GTA_LCS_RE_DIR") .. "/", "%(cfg.buildtarget.name)")
end
filter "platforms:win*"
@@ -330,6 +339,10 @@ project "reLCS"
-- external librw is dynamic
staticruntime "on"
end
+ prebuildcommands { '"%{prj.location}..\\printHash.bat" "%{prj.location}..\\src\\extras\\GitSHA1.cpp"' }
+
+ filter "platforms:not win*"
+ prebuildcommands { '"%{prj.location}/../printHash.sh" "%{prj.location}/../src/extras/GitSHA1.cpp"' }
filter "platforms:win*glfw*"
staticruntime "off"