From fff0a671899a95d1e71371a66a74937af66e7ff8 Mon Sep 17 00:00:00 2001 From: rdb Date: Mon, 28 Dec 2020 18:49:28 +0100 Subject: [PATCH] makepanda: better support building with FMOD Ex on macOS for now This means preferring the 10.13 SDK except when targeting arm64 (in which case FMOD Ex is disabled with a warning). --- makepanda/makepanda.py | 13 ++++++++++--- makepanda/makepandacore.py | 9 +++++++-- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/makepanda/makepanda.py b/makepanda/makepanda.py index 5f32e6e9e1..ab4aedcdef 100755 --- a/makepanda/makepanda.py +++ b/makepanda/makepanda.py @@ -756,14 +756,21 @@ if (COMPILER=="GCC"): PkgDisable("COCOA") if GetTarget() == 'darwin': - if 'x86_64' not in OSX_ARCHS and 'i386' not in OSX_ARCHS: + if OSX_ARCHS and 'x86_64' not in OSX_ARCHS and 'i386' not in OSX_ARCHS: # These support only these archs, so don't build them if we're not # targeting any of the supported archs. PkgDisable("FMODEX") PkgDisable("NVIDIACG") - elif (OSX_ARCHS and 'arm64' in OSX_ARCHS) or \ - not os.path.isfile('/usr/lib/libstdc++.6.0.9.dylib'): + elif OSX_ARCHS and 'arm64' in OSX_ARCHS: + # We must be using the 11.0 SDK or higher, so can't build FMOD Ex + if not PkgSkip("FMODEX"): + Warn("thirdparty package fmodex is not supported when targeting arm64, excluding from build") + PkgDisable("FMODEX") + elif not os.path.isfile(SDK.get("MACOSX", "") + '/usr/lib/libstdc++.6.0.9.tbd') and \ + not os.path.isfile(SDK.get("MACOSX", "") + '/usr/lib/libstdc++.6.0.9.dylib'): # Also, we can't target FMOD Ex on 10.14 and above + if not PkgSkip("FMODEX"): + Warn("thirdparty package fmodex requires one of MacOSX 10.9-10.13 SDK, excluding from build") PkgDisable("FMODEX") #if (PkgSkip("PYTHON")==0): diff --git a/makepanda/makepandacore.py b/makepanda/makepandacore.py index b7e1e56a51..b70081bdcc 100644 --- a/makepanda/makepandacore.py +++ b/makepanda/makepandacore.py @@ -2353,10 +2353,15 @@ def SdkLocateMacOSX(archs = []): handle.close() # Make a list of SDK versions that will work for us, then grab the latest. - sdk_versions = ["11.1", "11.0"] + sdk_versions = [] if 'arm64' not in archs: # Prefer pre-10.14 for now so that we can keep building FMOD. - sdk_versions += ["10.13", "10.12", "10.11", "10.10", "10.9", "10.15", "10.14"] + sdk_versions += ["10.13", "10.12", "10.11", "10.10", "10.9"] + + sdk_versions += ["11.1", "11.0"] + + if 'arm64' not in archs: + sdk_versions += ["10.15", "10.14"] for version in sdk_versions: sdkname = "MacOSX" + version