diff options
| author | 2016-01-04 19:15:32 +0100 | |
|---|---|---|
| committer | 2016-01-04 19:15:32 +0100 | |
| commit | 433676b7a1f37281cb22a0c6116856beec236efb (patch) | |
| tree | 31a60262e1d16dee90b1def59288afa7d63d7d84 /scripts/src/3rdparty.lua | |
| parent | fc07cc3621be84d6b54b9a02f946ca9e33272758 (diff) | |
Fixed OSX compile
Diffstat (limited to 'scripts/src/3rdparty.lua')
| -rw-r--r-- | scripts/src/3rdparty.lua | 99 |
1 files changed, 54 insertions, 45 deletions
diff --git a/scripts/src/3rdparty.lua b/scripts/src/3rdparty.lua index 579d246bbe9..9280da85f66 100644 --- a/scripts/src/3rdparty.lua +++ b/scripts/src/3rdparty.lua @@ -37,7 +37,7 @@ end "/wd4456", -- warning C4456: declaration of 'xxx' hides previous local declaration } configuration { } - + files { MAME_DIR .. "3rdparty/expat/lib/xmlparse.c", MAME_DIR .. "3rdparty/expat/lib/xmlrole.c", @@ -65,7 +65,7 @@ project "zlib" buildoptions { "-Wno-shift-negative-value", } - end + end end configuration { "vs*" } @@ -117,7 +117,7 @@ end -------------------------------------------------- -- SoftFloat library objects -------------------------------------------------- - + project "softfloat" uuid "04fbf89e-4761-4cf2-8a12-64500cf0c5c5" kind "StaticLib" @@ -139,7 +139,7 @@ if _OPTIONS["vs"]=="intel-15" then buildoptions { "/Qwd2557", -- remark #2557: comparison between signed and unsigned operands } -end +end configuration { } files { @@ -159,7 +159,7 @@ project "jpeg" configuration { "vs*" } buildoptions { - "/wd4100", -- warning C4100: 'xxx' : unreferenced formal parameter + "/wd4100", -- warning C4100: 'xxx' : unreferenced formal parameter "/wd4127", -- warning C4127: conditional expression is constant "/wd4244", -- warning C4244: 'argument' : conversion from 'xxx' to 'xxx', possible loss of data } @@ -167,7 +167,7 @@ if _OPTIONS["vs"]=="intel-15" then buildoptions { "/Qwd869", -- remark #869: parameter "xxx" was never referenced } -end +end configuration { } @@ -238,7 +238,7 @@ project "flac" buildoptions { "/wd4127", -- warning C4127: conditional expression is constant "/wd4244", -- warning C4244: 'argument' : conversion from 'xxx' to 'xxx', possible loss of data - "/wd4100", -- warning C4100: 'xxx' : unreferenced formal parameter + "/wd4100", -- warning C4100: 'xxx' : unreferenced formal parameter "/wd4702", -- warning C4702: unreachable code } if _OPTIONS["vs"]=="intel-15" then @@ -249,7 +249,7 @@ if _OPTIONS["vs"]=="intel-15" then "/Qwd188", -- error #188: enumerated type mixed with another type "/Qwd869", -- remark #869: parameter "xxx" was never referenced } -end +end configuration { "mingw-clang" } buildoptions { @@ -333,7 +333,7 @@ end "/wd4456", -- warning C4456: declaration of 'xxx' hides previous local declaration "/wd4457", -- warning C4457: declaration of 'xxx' hides function parameter } - + configuration { } defines { "_7ZIP_PPMD_SUPPPORT", @@ -371,7 +371,7 @@ project "lua" kind "StaticLib" -- uncomment the options below to - -- compile using c++. Do the same + -- compile using c++. Do the same -- in lsqlite3. -- In addition comment out the "extern "C"" -- in lua.hpp and do the same in luaengine.c line 47 @@ -383,7 +383,7 @@ project "lua" buildoptions_c { "-Wno-bad-function-cast" } - + configuration { "vs*" } buildoptions { "/wd4244", -- warning C4244: 'argument' : conversion from 'xxx' to 'xxx', possible loss of data @@ -409,7 +409,7 @@ end "LUA_32BITS", } end - + configuration { } includedirs { @@ -460,7 +460,7 @@ end -------------------------------------------------- -- sqlite3 lua library objects -------------------------------------------------- - + project "lsqlite3" uuid "1d84edab-94cf-48fb-83ee-b75bc697660e" kind "StaticLib" @@ -504,7 +504,7 @@ project "jsoncpp" buildoptions { "/wd4456", -- warning C4456: declaration of 'xxx' hides previous local declaration } - + configuration { } includedirs { @@ -515,7 +515,7 @@ project "jsoncpp" MAME_DIR .. "3rdparty/jsoncpp/src/lib_json/json_reader.cpp", MAME_DIR .. "3rdparty/jsoncpp/src/lib_json/json_value.cpp", MAME_DIR .. "3rdparty/jsoncpp/src/lib_json/json_writer.cpp", - + } -------------------------------------------------- @@ -546,14 +546,14 @@ end buildoptions { "/wd4456", -- warning C4456: declaration of 'xxx' hides previous local declaration } - - + + configuration { "gmake" } buildoptions_c { "-Wno-bad-function-cast", "-Wno-undef", } - + local version = str_to_version(_OPTIONS["gcc_version"]) if _OPTIONS["gcc"]~=nil and not string.find(_OPTIONS["gcc"], "clang") then if (version >= 40800) then @@ -587,7 +587,7 @@ project "portmidi" MAME_DIR .. "3rdparty/portmidi/pm_common", MAME_DIR .. "3rdparty/portmidi/porttime", } - + configuration { "vs*" } buildoptions { "/wd4100", -- warning C4100: 'xxx' : unreferenced formal parameter @@ -608,7 +608,7 @@ end buildoptions { "/wd4456", -- warning C4456: declaration of 'xxx' hides previous local declaration } - + configuration { "linux*" } defines { "PMALSA=1", @@ -660,11 +660,11 @@ links { "portmidi", } end -end +end -------------------------------------------------- -- BGFX library objects -------------------------------------------------- - + if (USE_BGFX == 1) then project "bgfx" uuid "d3e7e119-35cf-4f4f-aba0-d3bdcd1b879a" @@ -675,7 +675,7 @@ project "bgfx" "/wd4324", -- warning C4324: 'xxx' : structure was padded due to __declspec(align()) "/wd4244", -- warning C4244: 'argument' : conversion from 'xxx' to 'xxx', possible loss of data "/wd4611", -- warning C4611: interaction between '_setjmp' and C++ object destruction is non-portable - "/wd4310", -- warning C4310: cast truncates constant value + "/wd4310", -- warning C4310: cast truncates constant value } if _OPTIONS["vs"]=="intel-15" then buildoptions { @@ -686,7 +686,7 @@ if _OPTIONS["vs"]=="intel-15" then end configuration { } - includedirs { + includedirs { MAME_DIR .. "3rdparty/bgfx/include", MAME_DIR .. "3rdparty/bgfx/3rdparty", MAME_DIR .. "3rdparty/bx/include", @@ -707,7 +707,7 @@ end includedirs { MAME_DIR .. "3rdparty/bx/include/compat/osx", } - + configuration { "freebsd" } includedirs { MAME_DIR .. "3rdparty/bx/include/compat/freebsd", @@ -719,11 +719,11 @@ end } configuration { "gmake" } - buildoptions { + buildoptions { "-Wno-uninitialized", "-Wno-unused-function", } - + configuration { } if _OPTIONS["targetos"]=="windows" then @@ -736,7 +736,16 @@ end } end end - + + if _OPTIONS["targetos"]=="macosx" then + local version = str_to_version(_OPTIONS["gcc_version"]) + if _OPTIONS["gcc"]~=nil and string.find(_OPTIONS["gcc"], "clang") then + buildoptions { + "-Wno-switch", + } + end + end + defines { "__STDC_LIMIT_MACROS", "__STDC_FORMAT_MACROS", @@ -793,7 +802,7 @@ project "portaudio" configuration { "vs*" } buildoptions { - "/wd4245", -- warning C4245: 'conversion' : conversion from 'type1' to 'type2', signed/unsigned mismatch + "/wd4245", -- warning C4245: 'conversion' : conversion from 'type1' to 'type2', signed/unsigned mismatch "/wd4244", -- warning C4244: 'argument' : conversion from 'xxx' to 'xxx', possible loss of data "/wd4100", -- warning C4100: 'xxx' : unreferenced formal parameter "/wd4389", -- warning C4389: 'operator' : signed/unsigned mismatch @@ -825,7 +834,7 @@ end "-Wno-unknown-pragmas", } - local version = str_to_version(_OPTIONS["gcc_version"]) + local version = str_to_version(_OPTIONS["gcc_version"]) if (_OPTIONS["gcc"]~=nil) then if string.find(_OPTIONS["gcc"], "clang") then buildoptions_c { @@ -850,7 +859,7 @@ end "/wd4204", -- warning C4204: nonstandard extension used : non-constant aggregate initializer "/wd4701", -- warning C4701: potentially uninitialized local variable 'xxx' used } - + configuration { } includedirs { @@ -876,13 +885,13 @@ end "PA_USE_DS=1", "PA_USE_WDMKS=1", "PA_USE_WMME=1", - } + } includedirs { MAME_DIR .. "3rdparty/portaudio/src/os/win", } - configuration { } - files { + configuration { } + files { MAME_DIR .. "3rdparty/portaudio/src/os/win/pa_win_util.c", MAME_DIR .. "3rdparty/portaudio/src/os/win/pa_win_waveformat.c", MAME_DIR .. "3rdparty/portaudio/src/os/win/pa_win_hostapis.c", @@ -894,47 +903,47 @@ end MAME_DIR .. "3rdparty/portaudio/src/common/pa_ringbuffer.c", MAME_DIR .. "3rdparty/portaudio/src/hostapi/wmme/pa_win_wmme.c", } - + end if _OPTIONS["targetos"]=="linux" then defines { "PA_USE_ALSA=1", "PA_USE_OSS=1", "HAVE_LINUX_SOUNDCARD_H", - } + } includedirs { MAME_DIR .. "3rdparty/portaudio/src/os/unix", } - files { + files { MAME_DIR .. "3rdparty/portaudio/src/os/unix/pa_unix_hostapis.c", MAME_DIR .. "3rdparty/portaudio/src/os/unix/pa_unix_util.c", MAME_DIR .. "3rdparty/portaudio/src/hostapi/alsa/pa_linux_alsa.c", MAME_DIR .. "3rdparty/portaudio/src/hostapi/oss/pa_unix_oss.c", - } + } end if _OPTIONS["targetos"]=="macosx" then defines { "PA_USE_COREAUDIO=1", - } + } includedirs { MAME_DIR .. "3rdparty/portaudio/src/os/unix", } - files { + files { MAME_DIR .. "3rdparty/portaudio/src/os/unix/pa_unix_hostapis.c", MAME_DIR .. "3rdparty/portaudio/src/os/unix/pa_unix_util.c", MAME_DIR .. "3rdparty/portaudio/src/hostapi/coreaudio/pa_mac_core.c", MAME_DIR .. "3rdparty/portaudio/src/hostapi/coreaudio/pa_mac_core_utilities.c", MAME_DIR .. "3rdparty/portaudio/src/hostapi/coreaudio/pa_mac_core_blocking.c", MAME_DIR .. "3rdparty/portaudio/src/common/pa_ringbuffer.c", - } + } end - + else links { "portaudio", } end - + -------------------------------------------------- -- GoogleTest library objects -------------------------------------------------- @@ -966,7 +975,7 @@ end includedirs { MAME_DIR .. "3rdparty/googletest/googletest/include", MAME_DIR .. "3rdparty/googletest/googletest", - } - files { + } + files { MAME_DIR .. "3rdparty/googletest/googletest/src/gtest-all.cc", } |
