diff options
Diffstat (limited to 'scripts/src/3rdparty.lua')
-rw-r--r-- | scripts/src/3rdparty.lua | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/scripts/src/3rdparty.lua b/scripts/src/3rdparty.lua index 9d58a02fbc9..f4926be55e2 100644 --- a/scripts/src/3rdparty.lua +++ b/scripts/src/3rdparty.lua @@ -157,6 +157,12 @@ project "softfloat" includedirs { MAME_DIR .. "src/osd", } + + configuration { "gmake or ninja" } + buildoptions_cpp { + "-x c++", + } + configuration { "vs*" } buildoptions { "/wd4244", -- warning C4244: 'argument' : conversion from 'xxx' to 'xxx', possible loss of data @@ -196,6 +202,11 @@ includedirs { MAME_DIR .. "3rdparty/softfloat3/source/8086", } +configuration { "gmake or ninja" } +buildoptions_cpp { + "-x c++", +} + configuration { "vs*" } buildoptions { "/wd4701", -- warning C4701: potentially uninitialized local variable 'xxx' used @@ -1198,6 +1209,14 @@ project "bimg" configuration { } + if _OPTIONS["targetos"]=="macosx" or _OPTIONS["targetos"]=="linux" or _OPTIONS["targetos"]=="windows" then + if _OPTIONS["gcc"]~=nil and string.find(_OPTIONS["gcc"], "clang") then + buildoptions_cpp { + "-Wno-unused-const-variable", + } + end + end + defines { "__STDC_LIMIT_MACROS", "__STDC_FORMAT_MACROS", @@ -1206,11 +1225,25 @@ project "bimg" includedirs { MAME_DIR .. "3rdparty/bimg/include", + MAME_DIR .. "3rdparty/bimg/3rdparty/astc-codec", + MAME_DIR .. "3rdparty/bimg/3rdparty/astc-codec/include", } files { MAME_DIR .. "3rdparty/bimg/src/image.cpp", MAME_DIR .. "3rdparty/bimg/src/image_gnf.cpp", + + MAME_DIR .. "3rdparty/bimg/3rdparty/astc-codec/src/decoder/astc_file.cc", + MAME_DIR .. "3rdparty/bimg/3rdparty/astc-codec/src/decoder/codec.cc", + MAME_DIR .. "3rdparty/bimg/3rdparty/astc-codec/src/decoder/endpoint_codec.cc", + MAME_DIR .. "3rdparty/bimg/3rdparty/astc-codec/src/decoder/footprint.cc", + MAME_DIR .. "3rdparty/bimg/3rdparty/astc-codec/src/decoder/integer_sequence_codec.cc", + MAME_DIR .. "3rdparty/bimg/3rdparty/astc-codec/src/decoder/intermediate_astc_block.cc", + MAME_DIR .. "3rdparty/bimg/3rdparty/astc-codec/src/decoder/logical_astc_block.cc", + MAME_DIR .. "3rdparty/bimg/3rdparty/astc-codec/src/decoder/partition.cc", + MAME_DIR .. "3rdparty/bimg/3rdparty/astc-codec/src/decoder/physical_astc_block.cc", + MAME_DIR .. "3rdparty/bimg/3rdparty/astc-codec/src/decoder/quantization.cc", + MAME_DIR .. "3rdparty/bimg/3rdparty/astc-codec/src/decoder/weight_infill.cc", } -------------------------------------------------- @@ -1336,12 +1369,30 @@ end end end + if _OPTIONS["targetos"]=="macosx" and _OPTIONS["gcc"]~=nil then + if string.find(_OPTIONS["gcc"], "clang") and (version < 80000) then + defines { + "TARGET_OS_OSX=1", + } + end + end + defines { "__STDC_LIMIT_MACROS", "__STDC_FORMAT_MACROS", "__STDC_CONSTANT_MACROS", "BGFX_CONFIG_MAX_FRAME_BUFFERS=128", } + + if _OPTIONS["targetos"]=="linux" or _OPTIONS["targetos"]=="netbsd" or _OPTIONS["targetos"]=="openbsd" then + if _OPTIONS["NO_X11"]=="1" then + defines { + "BGFX_CONFIG_RENDERER_OPENGLES=1", + "BGFX_CONFIG_RENDERER_OPENGL=0", + } + end + end + files { MAME_DIR .. "3rdparty/bgfx/src/bgfx.cpp", MAME_DIR .. "3rdparty/bgfx/src/debug_renderdoc.cpp", @@ -1356,6 +1407,7 @@ end MAME_DIR .. "3rdparty/bgfx/src/renderer_gl.cpp", MAME_DIR .. "3rdparty/bgfx/src/renderer_gnm.cpp", MAME_DIR .. "3rdparty/bgfx/src/renderer_noop.cpp", + MAME_DIR .. "3rdparty/bgfx/src/renderer_nvn.cpp", MAME_DIR .. "3rdparty/bgfx/src/renderer_vk.cpp", MAME_DIR .. "3rdparty/bgfx/src/shader.cpp", MAME_DIR .. "3rdparty/bgfx/src/shader_dx9bc.cpp", @@ -1376,6 +1428,9 @@ end MAME_DIR .. "3rdparty/bgfx/src/glcontext_nsgl.mm", MAME_DIR .. "3rdparty/bgfx/src/renderer_mtl.mm", } + buildoptions { + "-x objective-c++", + } end -------------------------------------------------- |