summaryrefslogtreecommitdiffstats
path: root/premake5.lua
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2020-08-16 13:46:20 +0200
committerNikolay Korolev <nickvnuk@gmail.com>2020-08-16 13:46:20 +0200
commit7669b97ac64bd77dc0932210f81e4a0def9bfb1b (patch)
tree51c7580701ea00abc769e68d14a83a25b8ebd0cf /premake5.lua
parentsubmodule (diff)
parentMerge branch 'master' into miami (diff)
downloadre3-7669b97ac64bd77dc0932210f81e4a0def9bfb1b.tar
re3-7669b97ac64bd77dc0932210f81e4a0def9bfb1b.tar.gz
re3-7669b97ac64bd77dc0932210f81e4a0def9bfb1b.tar.bz2
re3-7669b97ac64bd77dc0932210f81e4a0def9bfb1b.tar.lz
re3-7669b97ac64bd77dc0932210f81e4a0def9bfb1b.tar.xz
re3-7669b97ac64bd77dc0932210f81e4a0def9bfb1b.tar.zst
re3-7669b97ac64bd77dc0932210f81e4a0def9bfb1b.zip
Diffstat (limited to 'premake5.lua')
-rw-r--r--premake5.lua70
1 files changed, 45 insertions, 25 deletions
diff --git a/premake5.lua b/premake5.lua
index acb15555..478ac18d 100644
--- a/premake5.lua
+++ b/premake5.lua
@@ -2,21 +2,21 @@ newoption {
trigger = "glewdir",
value = "PATH",
description = "Directory of GLEW",
- default = "glew-2.1.0"
+ default = "vendor/glew-2.1.0"
}
newoption {
trigger = "glfwdir64",
value = "PATH",
description = "Directory of glfw",
- default = "glfw-3.3.2.bin.WIN64",
+ default = "vendor/glfw-3.3.2.bin.WIN64",
}
newoption {
trigger = "glfwdir32",
value = "PATH",
description = "Directory of glfw",
- default = "glfw-3.3.2.bin.WIN32",
+ default = "vendor/glfw-3.3.2.bin.WIN32",
}
newoption {
@@ -30,9 +30,9 @@ newoption {
}
if(_OPTIONS["with-librw"]) then
- Librw = "librw"
+ Librw = "vendor/librw"
else
- Librw = os.getenv("LIBRW") or "librw"
+ Librw = os.getenv("LIBRW") or "vendor/librw"
end
function getsys(a)
@@ -77,6 +77,11 @@ workspace "reVC"
"linux-arm-librw_gl3_glfw-oal",
}
+ filter { "system:bsd" }
+ platforms {
+ "bsd-amd64-librw_gl3_glfw-oal"
+ }
+
filter "configurations:Debug"
defines { "DEBUG" }
@@ -90,6 +95,9 @@ workspace "reVC"
filter { "platforms:linux*" }
system "linux"
+ filter { "platforms:bsd*" }
+ system "bsd"
+
filter { "platforms:*x86*" }
architecture "x86"
@@ -144,9 +152,14 @@ if(_OPTIONS["with-librw"]) then
project "librw"
kind "StaticLib"
targetname "rw"
- targetdir "lib/%{cfg.platform}/%{cfg.buildcfg}"
+ targetdir(path.join(Librw, "lib/%{cfg.platform}/%{cfg.buildcfg}"))
files { path.join(Librw, "src/*.*") }
files { path.join(Librw, "src/*/*.*") }
+
+ filter "platforms:bsd*"
+ includedirs { "/usr/local/include" }
+ libdirs { "/usr/local/lib" }
+
filter "platforms:*RW34*"
flags { "ExcludeFromBuild" }
filter {}
@@ -207,9 +220,9 @@ project "reVC"
includedirs { "src/extras" }
if _OPTIONS["with-opus"] then
- includedirs { "ogg/include" }
- includedirs { "opus/include" }
- includedirs { "opusfile/include" }
+ includedirs { "vendor/ogg/include" }
+ includedirs { "vendor/opus/include" }
+ includedirs { "vendor/opusfile/include" }
end
filter "platforms:*mss"
@@ -219,9 +232,9 @@ project "reVC"
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" }
+ libdirs { "vendor/ogg/win32/VS2015/Win32/%{cfg.buildcfg}" }
+ libdirs { "vendor/opus/win32/VS2015/Win32/%{cfg.buildcfg}" }
+ libdirs { "vendor/opusfile/win32/VS2015/Win32/Release-NoHTTP" }
filter {}
defines { "AUDIO_OPUS" }
end
@@ -241,24 +254,26 @@ project "reVC"
characterset ("MBCS")
targetextension ".exe"
+ filter "platforms:win*oal"
+ includedirs { "vendor/openal-soft/include" }
+ includedirs { "vendor/libsndfile/include" }
+ includedirs { "vendor/mpg123/include" }
+
filter "platforms:win-x86*oal"
- includedirs { "openal-soft/include" }
- includedirs { "libsndfile.32/include" }
- includedirs { "mpg123.32/include" }
- libdirs { "mpg123.32/lib" }
- libdirs { "libsndfile.32/lib" }
- libdirs { "openal-soft/libs/Win32" }
+ libdirs { "vendor/mpg123/lib/Win32" }
+ libdirs { "vendor/libsndfile/lib/Win32" }
+ libdirs { "vendor/openal-soft/libs/Win32" }
filter "platforms:win-amd64*oal"
- includedirs { "openal-soft/include" }
- includedirs { "libsndfile.64/include" }
- includedirs { "mpg123.64/include" }
- libdirs { "mpg123.64/lib" }
- libdirs { "libsndfile.64/lib" }
- libdirs { "openal-soft/libs/Win64" }
+ libdirs { "vendor/mpg123/lib/Win64" }
+ libdirs { "vendor/libsndfile/lib/Win64" }
+ libdirs { "vendor/openal-soft/libs/Win64" }
filter "platforms:linux*oal"
links { "openal", "mpg123", "sndfile", "pthread" }
+
+ filter "platforms:bsd*oal"
+ links { "openal", "mpg123", "sndfile", "pthread" }
if _OPTIONS["with-opus"] then
filter {}
@@ -281,7 +296,7 @@ project "reVC"
includedirs { "src/fakerw" }
includedirs { Librw }
if(_OPTIONS["with-librw"]) then
- libdirs { "lib/%{cfg.platform}/%{cfg.buildcfg}" }
+ libdirs { "vendor/librw/lib/%{cfg.platform}/%{cfg.buildcfg}" }
end
links { "rw" }
@@ -307,3 +322,8 @@ project "reVC"
filter "platforms:linux*gl3_glfw*"
links { "GL", "GLEW", "glfw" }
+
+ filter "platforms:bsd*gl3_glfw*"
+ links { "GL", "GLEW", "glfw", "sysinfo" }
+ includedirs { "/usr/local/include" }
+ libdirs { "/usr/local/lib" }