summaryrefslogtreecommitdiffstats
path: root/premake5.lua
diff options
context:
space:
mode:
authoreray orçunus <erayorcunus@gmail.com>2020-07-29 18:32:37 +0200
committereray orçunus <erayorcunus@gmail.com>2020-07-29 18:32:37 +0200
commit0009558fcb0833ccdf2dcaec9d83b0413125fa5f (patch)
tree91a6258d27a8840c9020ccfbe3c1afaa528d3df5 /premake5.lua
parentFix Win32 OAL build (diff)
parentUpdate README.md (diff)
downloadre3-0009558fcb0833ccdf2dcaec9d83b0413125fa5f.tar
re3-0009558fcb0833ccdf2dcaec9d83b0413125fa5f.tar.gz
re3-0009558fcb0833ccdf2dcaec9d83b0413125fa5f.tar.bz2
re3-0009558fcb0833ccdf2dcaec9d83b0413125fa5f.tar.lz
re3-0009558fcb0833ccdf2dcaec9d83b0413125fa5f.tar.xz
re3-0009558fcb0833ccdf2dcaec9d83b0413125fa5f.tar.zst
re3-0009558fcb0833ccdf2dcaec9d83b0413125fa5f.zip
Diffstat (limited to 'premake5.lua')
-rw-r--r--premake5.lua27
1 files changed, 27 insertions, 0 deletions
diff --git a/premake5.lua b/premake5.lua
index 07ca5ced..ddcfd6a9 100644
--- a/premake5.lua
+++ b/premake5.lua
@@ -24,6 +24,11 @@ newoption {
description = "Build and use librw from this solution"
}
+newoption {
+ trigger = "with-opus",
+ description = "Build with opus"
+}
+
if(_OPTIONS["with-librw"]) then
Librw = "librw"
else
@@ -200,10 +205,25 @@ project "re3"
includedirs { "src/extras" }
includedirs { "eax" }
+ if _OPTIONS["with-opus"] then
+ includedirs { "ogg/include" }
+ includedirs { "opus/include" }
+ includedirs { "opusfile/include" }
+ end
+
filter "platforms:*mss"
defines { "AUDIO_MSS" }
includedirs { "milessdk/include" }
libdirs { "milessdk/lib" }
+
+ if _OPTIONS["with-opus"] then
+ filter "platforms:win*"
+ libdirs { "ogg/win32/VS2015/Win32/%{cfg.buildcfg}" }
+ libdirs { "opus/win32/VS2015/Win32/%{cfg.buildcfg}" }
+ libdirs { "opusfile/win32/VS2015/Win32/Release-NoHTTP" }
+ filter {}
+ defines { "AUDIO_OPUS" }
+ end
filter "platforms:*oal"
defines { "AUDIO_OAL" }
@@ -238,6 +258,13 @@ project "re3"
filter "platforms:linux*oal"
links { "openal", "mpg123", "sndfile", "pthread" }
+
+ if _OPTIONS["with-opus"] then
+ filter {}
+ links { "libogg" }
+ links { "opus" }
+ links { "opusfile" }
+ end
filter "platforms:*RW33*"
staticruntime "on"