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).
This commit is contained in:
rdb 2020-12-28 18:49:28 +01:00
parent e9c7d345df
commit fff0a67189
2 changed files with 17 additions and 5 deletions

View File

@ -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):

View File

@ -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