From 73c4665039004dfce0c0f0df19fd5873e0f68e77 Mon Sep 17 00:00:00 2001 From: AJR Date: Mon, 14 Oct 2019 07:46:42 -0400 Subject: Fix BGFX build on older OS X systems (nw) The Vulkan renderer has to be disabled on Yosemite and older because its backend depends on Metal. --- 3rdparty/bgfx/src/config.h | 2 +- scripts/src/3rdparty.lua | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/3rdparty/bgfx/src/config.h b/3rdparty/bgfx/src/config.h index dbf746e638d..8e3f53f954c 100644 --- a/3rdparty/bgfx/src/config.h +++ b/3rdparty/bgfx/src/config.h @@ -97,7 +97,7 @@ || BX_PLATFORM_LINUX \ || BX_PLATFORM_WINDOWS \ || BX_PLATFORM_NX \ - || BX_PLATFORM_OSX \ + || (BX_PLATFORM_OSX >= 101100) \ ? 1 : 0) # endif // BGFX_CONFIG_RENDERER_VULKAN diff --git a/scripts/src/3rdparty.lua b/scripts/src/3rdparty.lua index c80075bf9f1..cb213c2e679 100644 --- a/scripts/src/3rdparty.lua +++ b/scripts/src/3rdparty.lua @@ -1366,6 +1366,14 @@ 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", -- cgit v1.2.3-70-g09d2