summaryrefslogtreecommitdiffstatshomepage
path: root/scripts/src/3rdparty.lua
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/src/3rdparty.lua')
-rw-r--r--scripts/src/3rdparty.lua104
1 files changed, 86 insertions, 18 deletions
diff --git a/scripts/src/3rdparty.lua b/scripts/src/3rdparty.lua
index 16b86dcbe21..8ef18689e66 100644
--- a/scripts/src/3rdparty.lua
+++ b/scripts/src/3rdparty.lua
@@ -60,7 +60,7 @@ project "zlib"
local version = str_to_version(_OPTIONS["gcc_version"])
if _OPTIONS["gcc"]~=nil and (string.find(_OPTIONS["gcc"], "clang") or string.find(_OPTIONS["gcc"], "asmjs")) then
- configuration { "gmake" }
+ configuration { "gmake or xcode4" }
if (version >= 30700) then
buildoptions {
"-Wno-shift-negative-value",
@@ -85,7 +85,7 @@ end
"verbose=-1",
}
- configuration { "gmake" }
+ configuration { "gmake or xcode4" }
buildoptions_c {
"-Wno-strict-prototypes",
}
@@ -271,7 +271,7 @@ end
"HAVE_CONFIG_H=1",
}
- configuration { "gmake"}
+ configuration { "gmake or xcode4"}
buildoptions_c {
"-Wno-unused-function",
"-O0",
@@ -280,6 +280,11 @@ end
buildoptions {
"-Wno-enum-conversion",
}
+ if _OPTIONS["targetos"]=="macosx" then
+ buildoptions_c {
+ "-Wno-unknown-attributes",
+ }
+ end
end
configuration { }
@@ -379,7 +384,7 @@ project "lua"
-- "ForceCPP",
--}
- configuration { "gmake" }
+ configuration { "gmake or xcode4" }
buildoptions_c {
"-Wno-bad-function-cast"
}
@@ -398,6 +403,8 @@ end
configuration { }
defines {
"LUA_COMPAT_ALL",
+ "LUA_COMPAT_5_1",
+ "LUA_COMPAT_5_2",
}
if not (_OPTIONS["targetos"]=="windows") and not (_OPTIONS["targetos"]=="asmjs") then
defines {
@@ -458,20 +465,19 @@ links {
end
--------------------------------------------------
--- sqlite3 lua library objects
+-- small lua library objects
--------------------------------------------------
-project "lsqlite3"
+project "lualibs"
uuid "1d84edab-94cf-48fb-83ee-b75bc697660e"
kind "StaticLib"
- -- options {
- -- "ForceCPP",
- -- }
-
configuration { "vs*" }
buildoptions {
"/wd4244", -- warning C4244: 'argument' : conversion from 'xxx' to 'xxx', possible loss of data
+ "/wd4055", -- warning C4055: 'type cast': from data pointer 'void *' to function pointer 'xxx'
+ "/wd4152", -- warning C4152: nonstandard extension, function/data pointer conversion in expression
+ "/wd4130", -- warning C4130: '==': logical operation on address of string constant
}
configuration { }
@@ -487,9 +493,69 @@ project "lsqlite3"
MAME_DIR .. "3rdparty/lua/src",
}
end
+ if _OPTIONS["with-bundled-zlib"] then
+ includedirs {
+ MAME_DIR .. "3rdparty/zlib",
+ }
+ end
files {
MAME_DIR .. "3rdparty/lsqlite3/lsqlite3.c",
+ MAME_DIR .. "3rdparty/lua-zlib/lua_zlib.c",
+ MAME_DIR .. "3rdparty/luafilesystem/src/lfs.c",
+ }
+
+--------------------------------------------------
+-- luv lua library objects
+--------------------------------------------------
+
+project "luv"
+ uuid "d98ec5ca-da2a-4a50-88a2-52061ca53871"
+ kind "StaticLib"
+
+ if _OPTIONS["targetos"]=="windows" then
+ defines {
+ "_WIN32_WINNT=0x0600",
+ }
+ end
+ configuration { "vs*" }
+ buildoptions {
+ "/wd4244", -- warning C4244: 'argument' : conversion from 'xxx' to 'xxx', possible loss of data
+ }
+
+ configuration { "gmake or xcode4" }
+ buildoptions_c {
+ "-Wno-unused-function",
+ "-Wno-strict-prototypes",
+ "-Wno-unused-variable",
+ "-Wno-maybe-uninitialized",
+ "-Wno-undef",
+ }
+
+ configuration { "vs2015" }
+ buildoptions {
+ "/wd4701", -- warning C4701: potentially uninitialized local variable 'xxx' used
+ "/wd4703", -- warning C4703: potentially uninitialized local pointer variable 'xxx' used
+ }
+
+ configuration { }
+ defines {
+ "LUA_COMPAT_ALL",
+ }
+
+ includedirs {
+ MAME_DIR .. "3rdparty/lua/src",
+ MAME_DIR .. "3rdparty/libuv/include",
+ }
+ if _OPTIONS["with-bundled-lua"] then
+ includedirs {
+ MAME_DIR .. "3rdparty/luv/deps/lua/src",
+ }
+ end
+
+ files {
+ MAME_DIR .. "3rdparty/luv/src/luv.c",
+ MAME_DIR .. "3rdparty/luv/src/luv.h",
}
--------------------------------------------------
@@ -522,7 +588,7 @@ end
}
- configuration { "gmake" }
+ configuration { "gmake or xcode4" }
buildoptions_c {
"-Wno-bad-function-cast",
"-Wno-undef",
@@ -639,7 +705,6 @@ end
-- BGFX library objects
--------------------------------------------------
-if (USE_BGFX == 1) then
project "bgfx"
uuid "d3e7e119-35cf-4f4f-aba0-d3bdcd1b879a"
kind "StaticLib"
@@ -664,10 +729,14 @@ end
MAME_DIR .. "3rdparty/bgfx/include",
MAME_DIR .. "3rdparty/bgfx/3rdparty",
MAME_DIR .. "3rdparty/bx/include",
- MAME_DIR .. "3rdparty/bgfx/3rdparty/khronos",
MAME_DIR .. "3rdparty/bgfx/3rdparty/dxsdk/include",
}
+ configuration { "not steamlink"}
+ includedirs {
+ MAME_DIR .. "3rdparty/bgfx/3rdparty/khronos",
+ }
+
configuration { "vs*" }
includedirs {
MAME_DIR .. "3rdparty/bx/include/compat/msvc",
@@ -677,7 +746,7 @@ end
MAME_DIR .. "3rdparty/bx/include/compat/mingw",
}
- configuration { "osx*" }
+ configuration { "osx* or xcode4" }
includedirs {
MAME_DIR .. "3rdparty/bx/include/compat/osx",
}
@@ -692,7 +761,7 @@ end
MAME_DIR .. "3rdparty/bx/include/compat/freebsd",
}
- configuration { "gmake" }
+ configuration { "gmake or xcode4" }
buildoptions {
"-Wno-uninitialized",
"-Wno-unused-function",
@@ -763,7 +832,6 @@ end
MAME_DIR .. "3rdparty/bgfx/src/renderer_mtl.mm",
}
end
-end
--------------------------------------------------
-- PortAudio library objects
@@ -796,7 +864,7 @@ end
"/wd4456", -- warning C4456: declaration of 'xxx' hides previous local declaration
}
- configuration { "gmake" }
+ configuration { "gmake or xcode4" }
buildoptions_c {
"-Wno-strict-prototypes",
"-Wno-bad-function-cast",
@@ -931,7 +999,7 @@ project "uv"
MAME_DIR .. "3rdparty/libuv/src/win",
}
- configuration { "gmake" }
+ configuration { "gmake or xcode4" }
buildoptions_c {
"-Wno-strict-prototypes",
"-Wno-bad-function-cast",