summaryrefslogtreecommitdiffstats
path: root/premake5.lua
diff options
context:
space:
mode:
authorFire_Head <Fire-Head@users.noreply.github.com>2020-05-26 21:16:56 +0200
committerGitHub <noreply@github.com>2020-05-26 21:16:56 +0200
commitae8a377f26f9b56b5156b0462c30c5c49af7dd8a (patch)
treef15b8d6bb195ad71ffd9e7051c26a5b42e2f71a7 /premake5.lua
parentMerge pull request #550 from erorcun/miami (diff)
parentfix UB shit (diff)
downloadre3-ae8a377f26f9b56b5156b0462c30c5c49af7dd8a.tar
re3-ae8a377f26f9b56b5156b0462c30c5c49af7dd8a.tar.gz
re3-ae8a377f26f9b56b5156b0462c30c5c49af7dd8a.tar.bz2
re3-ae8a377f26f9b56b5156b0462c30c5c49af7dd8a.tar.lz
re3-ae8a377f26f9b56b5156b0462c30c5c49af7dd8a.tar.xz
re3-ae8a377f26f9b56b5156b0462c30c5c49af7dd8a.tar.zst
re3-ae8a377f26f9b56b5156b0462c30c5c49af7dd8a.zip
Diffstat (limited to '')
-rw-r--r--premake5.lua64
1 files changed, 48 insertions, 16 deletions
diff --git a/premake5.lua b/premake5.lua
index 44b8b576..6a27c5af 100644
--- a/premake5.lua
+++ b/premake5.lua
@@ -23,6 +23,22 @@ else
Librw = os.getenv("LIBRW") or "librw"
end
+function getsys(a)
+ if a == 'windows' then
+ return 'win'
+ end
+ return a
+end
+
+function getarch(a)
+ if a == 'x86_64' then
+ return 'amd64'
+ elseif a == 'ARM' then
+ return 'arm'
+ end
+ return a
+end
+
workspace "reVC"
language "C++"
configurations { "Debug", "Release" }
@@ -35,11 +51,16 @@ workspace "reVC"
"win-x86-RW33_d3d8-mss",
"win-x86-librw_d3d9-mss",
"win-x86-librw_gl3_glfw-mss",
+ "win-x86-RW33_d3d8-oal",
+ "win-x86-librw_d3d9-oal",
+ "win-x86-librw_gl3_glfw-oal",
}
filter { "system:linux" }
platforms {
"linux-x86-librw_gl3_glfw-oal",
+ "linux-amd64-librw_gl3_glfw-oal",
+ "linux-arm-librw_gl3_glfw-oal",
}
filter "configurations:Debug"
@@ -58,6 +79,12 @@ workspace "reVC"
filter { "platforms:*x86*" }
architecture "x86"
+ filter { "platforms:*amd64*" }
+ architecture "amd64"
+
+ filter { "platforms:*arm*" }
+ architecture "ARM"
+
filter { "platforms:*librw_d3d9*" }
defines { "RW_D3D9" }
if(not _OPTIONS["with-librw"]) then
@@ -68,17 +95,12 @@ workspace "reVC"
defines { "RW_GL3" }
includedirs { path.join(_OPTIONS["glfwdir"], "include") }
includedirs { path.join(_OPTIONS["glewdir"], "include") }
-
- filter "platforms:win*librw_gl3_glfw*"
- defines { "GLEW_STATIC" }
if(not _OPTIONS["with-librw"]) then
- libdirs { path.join(Librw, "lib/win-x86-gl3/%{cfg.buildcfg}") }
+ libdirs { path.join(Librw, "lib/%{getsys(cfg.system)}-%{getarch(cfg.architecture)}-gl3/%{cfg.buildcfg}") }
end
- filter "platforms:linux*librw_gl3_glfw*"
- if(not _OPTIONS["with-librw"]) then
- libdirs { path.join(Librw, "lib/linux-x86-gl3/%{cfg.buildcfg}") }
- end
+ filter "platforms:win*librw_gl3_glfw*"
+ defines { "GLEW_STATIC" }
filter {}
@@ -164,12 +186,16 @@ project "reVC"
includedirs { "src/weapons" }
includedirs { "src/extras" }
includedirs { "eax" }
-
- includedirs { "milessdk/include" }
- includedirs { "eax" }
-
- libdirs { "milessdk/lib" }
+ filter "platforms:*mss"
+ defines { "AUDIO_MSS" }
+ includedirs { "milessdk/include" }
+ libdirs { "milessdk/lib" }
+
+ filter "platforms:*oal"
+ defines { "AUDIO_OAL" }
+
+ filter {}
if(os.getenv("GTA_VC_RE_DIR")) then
setpaths("$(GTA_VC_RE_DIR)/", "%(cfg.buildtarget.name)", "")
end
@@ -181,9 +207,15 @@ project "reVC"
characterset ("MBCS")
targetextension ".exe"
- filter "platforms:linux*"
- targetextension ".elf"
- defines { "OPENAL" }
+ filter "platforms:win*oal"
+ includedirs { "openal-soft/include" }
+ includedirs { "libsndfile/include" }
+ includedirs { "mpg123/include" }
+ libdirs { "openal-soft/libs/Win32" }
+ libdirs { "libsndfile/lib" }
+ libdirs { "mpg123/lib" }
+
+ filter "platforms:linux*oal"
links { "openal", "mpg123", "sndfile", "pthread" }
filter "platforms:*RW33*"